我經歷了很多線程,但是我還是無法得到答案。在Imageview中清除圖像
我的圖像編程設置爲ImageView的作爲
imageview.setBackgroundResource(R.Drawable.image);
如果我設置圖像上面,將圖像被清除,如果我給
imageview.setImageDrawable(null);
是什麼意思imageview.setBackgroundDrawable(null)
?
是什麼
imageview.setImageDrawable(null);
和
imageview.setImageBitmap(null);
和
imageview.setBackgroundDrawable(null);
這是真實的答案 –
setBackgroundResource(0)是最好的選擇。從文檔。 setBackground需要ApI 16或更高版本..請參閱http://developer.android.com/reference/android/view/View.html#setBackgroundResource%28int%29 – Nepster