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. python - 关于matplotlib的x轴显示的问题2. mysql优化 - mysql慢查询copying to tmp table3. android 文件File删除问题4. javascript - vue生成一维码?求助!!!!!急5. ueditor上传服务器提示后端配置项没有正常加载,求助!!!!!6. css - .clearfix:after中为什么设置display: table7. 请教: 关于 python 反斜杠转义的疑问8. css - transform: translateY(-50%)在360浏览器极速模式下使得文字变模糊了9. angular.js - 怎样在使用ng-repeat属性的标签里面监听单个事件,使其能够单个改变CSS。10. nginx英文文档的WebSocket proxying部分没看太明白,麻烦推荐一点中文文章
