Universal-Image-Loader使用注意,Listview中加入SwipeLayout,删除某item的时候,会出现类似抖动的现象

来源:互联网 发布:剪裁音乐软件 编辑:程序博客网 时间:2024/06/11 05:54

现象:删除ListView里面的item的时候,会出现类似的抖动现象,体验不是很好。

options = new DisplayImageOptions.Builder()
.showImageOnLoading(R.drawable.image_load)
.showImageForEmptyUri(R.drawable.image_load)
.showImageOnFail(R.drawable.image_load).cacheInMemory(true)
.cacheOnDisk(true).displayer(new RoundedBitmapDisplayer(20))
.displayer(new FadeInBitmapDisplayer(300)).build();



总结:(1)其实是由于Universal-Image-Loader使用的过程中加入了动画,所导致的。displayer(new RoundedBitmapDisplayer(20))
.displayer(new FadeInBitmapDisplayer(300))去掉既可以了。

    (2)使用Universal-Image-Loader可以设置在不同的界面使用不用的options,比如在头像的界面中使用R.drawable_default_head,

       而在其他的界面使用R.drawable.image_load来使用。根据需求来设置不同的options。


0 0