qq - Android 如何解码gif图?
PHP中文网
PHP中文网 2017-04-17 17:10:52
0
2
281

要在聊天列表里面显示大的GIF动态图,类似QQ微信很大的那种动态表情,用过几个开源的自定义的gif控件,但是太卡了,尤其我ListView展示的时候getview方法会频繁调用,反复添加或者创建gif控件或者重复给gif控件设置源会出各种问题,所以问下有没有gif解码的库,可以把gif解码成一张一张的图?只能循环去显示了,有没有更好的方法呢?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
迷茫

The image loading library glide can directly support the display of gif. Please refer to this link: http://blog.csdn.net/zhangphil/article/details/45561983

Also, from what you said, there are indeed some problems with the implementation of your listview's adapter. Is the ViewHolder mechanism well implemented? Are you using viewType to support different Item views? If not, quickly transform it. It is recommended to use recyclerView. Well, the historical mission of listview has been completed.

Ty80

Don’t use listview, recyclerview is better, then use fresco, and then add a sliding judgment. Loading the image until the sliding is completed can effectively alleviate repeated call creation and avoid lagging.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!