在gridview中使用Fresco加载本地图片,结果非常卡,一开始是直接
setImageURI
后来这样写也是很卡
Uri uri = Uri.fromFile(new File(list.get(position).path));
int width = 60, height = 60;
ImageRequest request = ImageRequestBuilder.newBuilderWithSource(uri)
.setResizeOptions(new ResizeOptions(width, height))
.build();
DraweeController controller = Fresco.newDraweeControllerBuilder()
.setOldController(holder.showImg.getController())
.setImageRequest(request)
.build();
四张图片就开始卡,图片加载慢,点击事件两秒之后才触发