bitmap回收问题
来源:互联网 发布:开罗赛车 车辆数据 编辑:程序博客网 时间:2024/06/04 21:49
我要讲获取到的一组bitmap类型的图片显示到我的GirdView中自定义的ImageView控件里。。然后报错了
Canvas: trying to use a recycled bitmap这个错误,,但是我没有回收啊?
各位大神帮我看下紫色标注的这行代码这这个方法里面,,有什么问题吗
public View getView(int position, View v, ViewGroup parent) {
ViewHolder h;
if (v == null) {
v = getLayoutInflater().inflate(R.layout.video_show_item, null);
v.setLayoutParams(params);
h = new ViewHolder();
h.ivVideo = (RecycledImageView) v.findViewById(R.id.iv_video);
h.ivCheckedVideo = (ImageView) v.findViewById(R.id.iv_checked_video);
h.llVideo = (LinearLayout) v.findViewById(R.id.ll_video);
h.tvNameVideo = (TextView) v.findViewById(R.id.tv_name_video);
h.tvCountVideo = (TextView) v.findViewById(R.id.tv_count_video);
v.setTag(h);
} else {
h = (ViewHolder) v.getTag();
}
h.llVideo.setVisibility(View.GONE);
h.ivCheckedVideo.setVisibility(View.VISIBLE);
System.out.println(bitmaps.get(position).getVideoBitmap()+"---------------------------------------------"+position);
h.ivVideo.setImageBitmap(bitmaps.get(position).getVideoBitmap());
return v;
}
Canvas: trying to use a recycled bitmap这个错误,,但是我没有回收啊?
各位大神帮我看下紫色标注的这行代码这这个方法里面,,有什么问题吗
public View getView(int position, View v, ViewGroup parent) {
ViewHolder h;
if (v == null) {
v = getLayoutInflater().inflate(R.layout.video_show_item, null);
v.setLayoutParams(params);
h = new ViewHolder();
h.ivVideo = (RecycledImageView) v.findViewById(R.id.iv_video);
h.ivCheckedVideo = (ImageView) v.findViewById(R.id.iv_checked_video);
h.llVideo = (LinearLayout) v.findViewById(R.id.ll_video);
h.tvNameVideo = (TextView) v.findViewById(R.id.tv_name_video);
h.tvCountVideo = (TextView) v.findViewById(R.id.tv_count_video);
v.setTag(h);
} else {
h = (ViewHolder) v.getTag();
}
h.llVideo.setVisibility(View.GONE);
h.ivCheckedVideo.setVisibility(View.VISIBLE);
System.out.println(bitmaps.get(position).getVideoBitmap()+"---------------------------------------------"+position);
h.ivVideo.setImageBitmap(bitmaps.get(position).getVideoBitmap());
return v;
}
0 0
- bitmap资源回收问题
- bitmap回收问题
- bitmap回收问题
- 关于bitmap回收的问题
- 关于bitmap的回收问题
- OOM问题(bitmap背景用完回收)
- Bitmap回收
- bitmap 回收
- Bitmap回收
- 回收bitmap
- Bitmap的回收
- Android Bitmap回收 注意事项
- android BitMap回收
- 有关bitmap回收
- Bitmap调用recycle()回收内存
- 强制回收ImageView的bitmap
- Activity中bitmap的回收
- android开发记录1 GridView加载大量本地图片的bitmap的回收问题
- 如何写好一份测试用例
- Codeforces Round #388 (Div. 2)D. Leaving Auction(二分+思维)
- android内存管理,垃圾回收策略的疑惑
- MYSQL 中 SQL 常用操作
- php数组
- bitmap回收问题
- OS X使用pkg-config
- WebView和ListView的交互使用,异步加载的问题
- android为什么我调用新浪微博分享图片,分享的是一张很模糊,基本失真的图片。。怎么处理
- AndroidStudio中的快捷键
- 急急急!!!请教一个关于ASP不报错的问题!浪费一下午的时间啊。。。。。。
- 欢迎使用CSDN-markdown编辑器
- SurfaceView surfaceChanged() 怎么才能再次调用
- ios中NSMutableArray可变数组add新数组