“The type Gallery is deprecated”, Whats the best alternative?

巧了我就是萌 提交于 2019-11-28 09:04:27

It states in the docs:

This widget is no longer supported. Other horizontally scrolling widgets include HorizontalScrollView and ViewPager from the support library.

HorizontalScrollView will be closer to what you are looking for I think.

I suspect that Gallery was deprecated because it did not properly use convertView with its adapter. Which meant that it had to create a new view for every item which was a drain on performance.

Another option you have is to use the 3rd party created EcoGallery which Joseph Earl created to overcome the issue, this version does recycle its views properly. Unfortunately that pastebin link is the only reference to it I can find online now.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!