Пример #1
0
 public static void runOnUiThread(Runnable runnable) {
   // TODO Auto-generated method stub
   if (android.os.Process.myTid() == BaseApplication.getMainTid()) {
     runnable.run();
   } else {
     BaseApplication.getHandler().post(runnable);
   }
 }
Пример #2
0
 // 获取上下文
 public static Context getContext() {
   return BaseApplication.getApplication();
 }
Пример #3
0
 public static Resources getResource() {
   return BaseApplication.getApplication().getResources();
 }