0

I used gallery view to display images but I want only one side to scroll. How do I stop left to right scrolling or backward scrolling? Or how do I create custom gallery?

Richard J. Ross III
  • 55,009
  • 24
  • 135
  • 201
Ravindra Bagale
  • 17,226
  • 9
  • 43
  • 70

1 Answers1

0

GallerView is a deprecated widget.

I use ViewPager which you can modify as a custom gallery. Your fragments will be your slides or images which you will be able to swipe around.

You can read more about that here or here.

If you want to swipe only one way, then you would have to extend ViewPager and override onTouch event.

Community
  • 1
  • 1
Arturs Vancans
  • 4,531
  • 14
  • 47
  • 76
  • i used that but i have to display 3 images at time center, previous and next. the previous and next image show little not whole. but in viewpager when i swipe next image it swipe whole page with 3 images. – Ravindra Bagale Feb 27 '13 at 15:07
  • That's not the case. With ViewPager you can specify any sizes. Have a look at the second link I gave you. There is an image where 3 pictures are seen at the same time. – Arturs Vancans Feb 27 '13 at 15:09
  • Otherwise (I haven't tried that, but..) you could extend GalleryView and override its onTouchEvent. – Arturs Vancans Feb 27 '13 at 15:10
  • Thanks this work for me but i want show images in circular way after last image display first again and so on , and another one is how to stop left to right scrolling in pagecontainer. – Ravindra Bagale Feb 28 '13 at 05:35
  • Then you will have to create a new question as your original question does not specify that. – Arturs Vancans Feb 28 '13 at 15:45