Android Automatic Circular Gallery

后端 未结 2 1541
北海茫月
北海茫月 2021-02-06 18:33

I am having gallery widget contains 1-10 images to slide. I know that when I stripe the screen , the images scroll from left to right. I want automatic circular gallery after 10

相关标签:
2条回答
  • 2021-02-06 18:59

    Write a SpinnerAdapter for the Gallery that returns Integer.MAX_VALUE in it's getCount() method. Then, when returning a View in getDropDownView() and getView(), apply modulo of the actual items count to the position argument.

    0 讨论(0)
  • 2021-02-06 19:07

    I implemented a simplest solution. Just returns Integer.MAX_VALUE in it's getCount() method This will make infinite pool at right side. To make it both sided pass Integer.MAX_VALUE/2 in the position of child in setSelection(position, animate) Cool.

    0 讨论(0)
提交回复
热议问题