android glide asbitmap 在baseadpter中的问题
问题描述

public View getView( final int position, View convertView, ViewGroup parent) { View view=convertView; if (view==null){view=layoutInflater.inflate(R.layout.lable,null); } imageview=new ImageView(getContext()); imageview= (ImageView) view.findViewById(R.id.listimageview); SimpleTarget target = new SimpleTarget<Bitmap>() {@Overridepublic void onResourceReady(Bitmap bitmap, GlideAnimation glideAnimation) { Drawable drawable = new BitmapDrawable(bitmap); Bitmap bitmap1 = ((BitmapDrawable)drawable).getBitmap(); Bitmap reflectedBitmap = BitmapUtil.createReflectedBitmap(bitmap1); BitmapDrawable drawable1 = new BitmapDrawable(reflectedBitmap); drawable1.setAntiAlias(true); imageview.setImageDrawable(drawable1);} }; Glide.with(getContext()).load(getItem(position).imgurl).asBitmap().into(target); //Glide.with(getContext()).load(getItem(position).imgurl).into(imageview);
当在baseadpter中处理gilde得到的bitmap再加载进去。。。只有最后一个item才显示然而不处理bitemap直接loadinto进去则全部显示。。。求解
问题解答
回答1:已经解决。。。glide的未操作完成便返回view
相关文章:
1. docker绑定了nginx端口 外部访问不到2. docker-compose 为何找不到配置文件?3. Docker for Mac 创建的dnsmasq容器连不上/不工作的问题4. dockerfile - [docker build image失败- npm install]5. docker-compose中volumes的问题6. boot2docker无法启动7. docker网络端口映射,没有方便点的操作方法么?8. 关docker hub上有些镜像的tag被标记““This image has vulnerabilities””9. dockerfile - 我用docker build的时候出现下边问题 麻烦帮我看一下10. angular.js使用$resource服务把数据存入mongodb的问题。

网公网安备