Example #1
0
 /**
  * 在主线程中执行延迟任务
  *
  * @param r
  * @param delayMillis
  */
 public static void runOnUiThread(Runnable r, long delayMillis) {
   BaseApplication.getAppHandler().postDelayed(r, delayMillis);
 }
Example #2
0
 /**
  * 获得Resources对象
  *
  * @return
  */
 public static Resources getResources() {
   return BaseApplication.getContext().getResources();
 }
Example #3
0
 /**
  * 在主线程执行任务,该方法在fragment中也可以使用.
  *
  * @param r
  */
 public static void runOnUiThread(Runnable r) {
   BaseApplication.getAppHandler().post(r);
 }