簡單生活 單純享受
try{ Bitmap _IMG = ((BitmapDrawable) view.getDrawable()).getBitmap(); if(_IMG != null && !_IMG.isRecycled()) { _IMG.recycle(); } if(resource != -1) view.setImageResource(resource); else view.setImageDrawable(null); }catch (NullPointerException e){}