摘要:
在2.3.3及以下版本:通過定義兩個整形變量來檢測bitmap是否display過或者已經在緩存中下面的代碼當bitmap滿足兩個條件就被回收掉:1. 兩個整形變量都變為02. bitmap不為null並且還沒有被回收掉private int mCacheRefCount = 0; private ... 阅读全文
摘要:
1.使用AsyncTask異步加載bitmap圖片避免OOM: class BitmapWorkerTask extends AsyncTask { private final WeakReference imageViewReference; private int data = ... 阅读全文
摘要:
讀取Bitmap對象實際的尺寸和類型BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeResource(getReso... 阅读全文
摘要:
判断有处理Intent的ActivityPackageManager packageManager = getPackageManager();List activities = packageManager.queryIntentActivities(mapIntent, 0); boolean ... 阅读全文