Horizontal scroll over a list of Image views

2019-09-05 22:45发布

After going through several third party as well as android default components I can't find a way through which I can implement a dynamic horizontal Scroll List View where the List is a list of image urls handled by my custom Adapter.

I even tried this DevSmartLib - Android but this doesnot work with fragment. I can't really figure out the reason but the rendered view is not being shown with the fragment but it works fine with simple Acitvity.

Other possibilites are:

  • Gallery View

    It has been depreciated by Android in API - 16

  • Horizontal Scroll View with a Grid View as its root element

    I havn't tried this but based on the developer community I think we cant achieve a horizontal scroll even if we force the grid view to be of one row

Has any one done this before or can any one help me with this as all I need is to have a horizontal scroll over a list of image views that I am fetching from facebook.

1条回答
够拽才男人
2楼-- · 2019-09-05 23:23

Horizontal Scroll View is only good if you have just a few items. If you have a lot, you should consider an alternative: a ViewPager (in case you wish to show only a single item at a time), or a third party library like "Horizontal Variable ListView". I'm sure there are other alternatives.

note that the Gallery view is very inefficient and buggy so you shouldn't even try to use it.

查看更多
登录 后发表回答