HorizontalScrollView custom adapter?

只愿长相守 提交于 2019-12-06 03:46:59

HorizontalScrollView can contain only one View, so you have to draw that whole View anytime you are drawing any part of it. This could, however, be worked around by

  1. extending ViewGroup as child of your HorizontalScrollView
  2. using your custom adapter in that ViewGroup and call getView() and recycle on your own, drawing only Views that are currently visible in your HorizontalScrollView

But this would take a lot if your time. I'd at least try something like HorizontalListView first. A how-to of that specific class can be found here.

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