1

I'm trying to figure out the best approach to design a horizontal scrollview with only a few buttons that when scroll if end is reached it starts showing the first items again hence carousel behavior.

By carousel behavior I'm not saying 3D circle carousel, I just mean that you can continue scrolling horizontally, forever, and the first item shows up again when the end is reached, for example when scrolling swiping to the left.

Any suggestions would be greatly appreciated.

Jona
  • 13,325
  • 15
  • 86
  • 129
  • Take a look at the Gallery widget, then come back here when you want to replace the Images with Buttons and can't fathom the reach end goto start code. – Blundell Jul 09 '11 at 22:26
  • Gallery does not provide carousel behavior. If i simply wanted horizontal scroll I would just use horizontalscrollview. ;-) – Jona Jul 09 '11 at 22:42
  • I no it doesn't, but you would just extend gallery and maybe see what position your at then reorder the images/buttons. Just an idea – Blundell Jul 09 '11 at 22:45

2 Answers2

0

This is way in the future to be useful to the original poster, but for any others who stumble upon this question, I created a custom view that does exactly what Benjamin wanted:

https://github.com/moldedbits/infinitely-scrolling-carousel

Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
Anuj
  • 1,912
  • 1
  • 12
  • 19
0

You might try this, http://code.google.com/p/infinite-gallery/

If that doesn't work then I don't understand the question and you might want to try and give a bit more detail as to why it doesn't meet your needs

If by carousel ( a rather subjective term) you mean each item has a different "depth" with the center item the most prominent in so far as the UI there are other projects that have done this too

Idistic
  • 6,281
  • 2
  • 28
  • 38
  • Thanks for the link. It's a bit buggy and it's not exactly infinity but definetely will help to look into the code see if I can do something similar but to my fitting... I have updated the question a little more about the carousel behavior... – Jona Jul 10 '11 at 17:15
  • @Moto I still think you should be able to use the gallery and just create a custom view and then loop it, here is another link that does the looping, look at the third answer down http://stackoverflow.com/questions/3633370/android-circular-gallery/3635753#3635753 – Idistic Jul 10 '11 at 17:35