Exemplo n.º 1
0
 private void setBitmapToPhotoView() {
   Bitmap bitmap = BitmapCache.getInstance().getBitmap(mPath);
   if (bitmap == null) {
     bitmap =
         BitmapUtil.getSuitableBitmap(
             mPath, mScreenWidth, 0, BitmapUtil.DEFAULT_CONFIG, ImageView.ScaleType.FIT_XY);
     if (bitmap != null) {
       BitmapCache.getInstance().putBitmap(mPath, bitmap);
     }
   }
   mPhotoView.setImageBitmap(bitmap);
 }