android开发清除ImageView背景圖片
2014-04-21 18:40
302 查看
(可以在OnDestroy或者你认为需要释放资源的时机)
Bitmap leftBitmap = ((BitmapDrawable) iv.getDrawable()).getBitmap(); ivLeftAvatar.setImageDrawable(null); if (leftBitmap != null && !leftBitmap.isRecycled()){ leftBitmap.recycle(); leftBitmap = null; } System.gc();
相关文章推荐
- Android开发中ImageLoder加载网络图片时将图片设置为ImageView背景的方法
- Android开发之--将imageview设置圆角 并通过Glide加载出来
- Android开发,使用背景图(xml drawable)为view 设置边框
- Android开发之自定义圆形的ImageView的实现
- Android手机开发:ImageView使用和从内存读取图片显示
- Android开发学习:ImageView的scaletype属性
- Android开发学习:ImageView的scaletype属性
- Android中的ImageView的getDrawableCache获取背景图片的时候注意的问题
- android中使用selector动态改变imageView或ImageViewButton的背景
- android应用开发之ImageView,SeekBar,TableHost,ProgressBar的使用
- imageView清除背景
- Android开发实现ImageView宽度顶边显示,高度保持比例的方法
- android中使用selector动态改变imageView或ImageViewButton的背景
- android 实现ImageView按压效果和解决背景图片拉申问题
- Android开发学习:ImageView的scaletype属性
- Android中的ImageView的getDrawableCache获取背景图片的时候注意的问题
- Android开发,使用背景图(xml drawable)为view 设置边框
- Android控件开发之ImageView
- Android开发:ImageView阴影和图层效果
- Android开发——相册拍照_02.将拍照得到或相册中选择的图片显示在ImageView中