Exemplo n.º 1
0
 public static ImageFetcher createImageFetcher(BaseActivity activity) {
   if (activity.getImageFether() != null) {
     return activity.getImageFether();
   }
   ImageCacheParams params = new ImageCacheParams(activity, IMAGE_CACHE_DIR);
   params.setMemCacheSizePercent(0.25f); // Set memory cache to 25% of app memory
   ImageFetcher fetcher = new ImageFetcher(activity, getMaxScreenSide(activity));
   fetcher.addImageCache(activity.getSupportFragmentManager(), params);
   activity.setImageFetcher(fetcher);
   return fetcher;
 }
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.msg_ui_imagezoom);
   init();
   initData();
 }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentLayout(R.layout.social_ui_messagelist_layout);
   try {
     init();
     initData();
   } catch (Exception e) {
     e.printStackTrace();
   }
   requestData(pageIndex + "", true);
 }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentLayout(R.layout.public_ui_flight_annual_leave_apply);
   try {
     init();
     initData();
     getAnnualLeaveInfo();
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Exemplo n.º 5
0
 public static int getMaxScreenSide(BaseActivity activity) {
   if (maxScreenSide > 0) return maxScreenSide;
   final DisplayMetrics dm = new DisplayMetrics();
   activity.getWindowManager().getDefaultDisplay().getMetrics(dm);
   return Math.max(dm.heightPixels, dm.widthPixels);
 }
 @Override
 protected void onResume() {
   super.onResume();
   requestData(0 + "", true);
 }
 @Override
 protected void onDestroy() {
   super.onDestroy();
 }