Closed or circular Horizontal ListView Android

主宰稳场 提交于 2019-12-18 02:54:30

问题


I have an Horizontal listview i want listview should be closed. For example if the last item is reached in Listview then show the first item below the last item. It means item should be in circular format. And if i scroll from first item it should show last item before first item. I want scrolling for both side.

Below image can tell u what exactly i want

In the First image it is showing 5 items and when scroll the Listview it should scroll the items As shown in Second image Thanks In Advance.


回答1:


As per your requirement you want circular/infinite scrolling horizontal list view,

This is InfiniteScrollView which may help.You need to update this library as per your requirement and change ImageView to any other view which you want to scroll horizontally.

Edit - Solution below works for scrolling list view circularly only on one side ::

Check this circular-list for implementing a circular list adapter. And as your list view is horizontal check this library to create a custom horizontal list view.

Happy Coding :)



来源:https://stackoverflow.com/questions/23211638/closed-or-circular-horizontal-listview-android

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