Android : ViewFlipper Or ViewPager - Which is the better option?

眉间皱痕 提交于 2019-11-28 08:57:43

intro: On first thought I would recommend Gallery widget instead of ViewFlipper but it is depreciated (0.o) since JellyBean (API 16), probably because of bad recycling of nonvisible elements implementation.

answer: What u really should use now is ViewPager or HorizontalScrollView. In your case (despite not too much given details) I think is better ViewPager because according to documentation:

.. HorizontalScrollView is a FrameLayout, meaning you should place one child in it, containing the entire contents to scroll ..

On the other side for ViewPager you should implement PagerAdapter to generate pages which will be shown in this view.

My final answer is A, ViewPager ;)

Hope u will find this helpful ;) Cheers

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