Exemplo n.º 1
0
 /**
  * 获取关闭高光图标的副本
  *
  * @return
  */
 public BitmapDrawable getColseLightIconCopy() {
   try {
     if (mCloseLightIcon == null) {
       if (mThemeController == null) {
         mThemeController = AppFuncFrame.getThemeController();
       }
       BitmapDrawable origImg =
           (BitmapDrawable)
               mThemeController.getDrawable(
                   mThemeController.getThemeBean().mAppIconBean.mKillAppLight);
       if (origImg != null) {
         Bitmap copy = origImg.getBitmap().copy(Bitmap.Config.ARGB_8888, true);
         if (copy != null) {
           mCloseLightIcon = new BitmapDrawable(mContext.getResources(), copy);
         }
       }
     }
   } catch (OutOfMemoryError e) {
     e.printStackTrace();
     OutOfMemoryHandler.handle();
   } catch (Exception e) {
     e.printStackTrace();
   }
   return mCloseLightIcon;
 }
Exemplo n.º 2
0
 /**
  * 获取编辑文件夹高光图标的副本
  *
  * @return
  */
 public BitmapDrawable getEditLightIconCopy() {
   try {
     if (mEditLightIcon == null) {
       // BitmapDrawable origImg = (BitmapDrawable) mActivity
       // .getResources().getDrawable(
       // R.drawable.eidt_folder_light);
       if (mThemeController == null) {
         mThemeController = AppFuncFrame.getThemeController();
       }
       BitmapDrawable origImg =
           (BitmapDrawable)
               mThemeController.getDrawable(
                   mThemeController.getThemeBean().mAppIconBean.mEditHighlightFolder);
       if (origImg != null) {
         Bitmap copy = origImg.getBitmap().copy(Bitmap.Config.ARGB_8888, true);
         if (copy != null) {
           mEditLightIcon = new BitmapDrawable(mContext.getResources(), copy);
         }
       }
     }
   } catch (OutOfMemoryError e) {
     e.printStackTrace();
     OutOfMemoryHandler.handle();
   } catch (Exception e) {
     e.printStackTrace();
   }
   return mEditLightIcon;
 }
Exemplo n.º 3
0
 /**
  * 获取卸载图标的副本
  *
  * @return
  */
 public BitmapDrawable getKillIconCopy() {
   try {
     if (mKillImg == null) {
       // BitmapDrawable origImg = (BitmapDrawable) mActivity
       // .getResources().getDrawable(R.drawable.kill);
       if (mThemeController == null) {
         mThemeController = AppFuncFrame.getThemeController();
       }
       BitmapDrawable origImg =
           (BitmapDrawable)
               mThemeController.getDrawable(
                   mThemeController.getThemeBean().mAppIconBean.mDeletApp);
       if (origImg != null) {
         Bitmap copy = origImg.getBitmap().copy(Bitmap.Config.ARGB_8888, true);
         if (copy != null) {
           mKillImg = new BitmapDrawable(mContext.getResources(), copy);
         }
       }
     }
   } catch (OutOfMemoryError e) {
     e.printStackTrace();
     OutOfMemoryHandler.handle();
   } catch (Exception e) {
     e.printStackTrace();
   }
   return mKillImg;
 }