0

I want to create an image slider using the HorizontalScrollView. Indeed, the slider will display one image at the time and I want to be able to use the fling gesture to navigate left and right in the slider. Any Idea to which methods to override in the HorizontalScrollView to achieve this. Thanks a lot. Best

  • dont we have Gallery view for this purpose? – AAnkit Jan 17 '13 at 17:53
  • Check out this answer for how to use ViewPager to achieve this : [Android ViewPager as Image Slide Gallery][1] [1]: http://stackoverflow.com/questions/13796382/android-viewpager-as-image-slide-gallery?lq=1 – Scott Leslie Jan 17 '13 at 17:59

3 Answers3

1

You could use Gallery with Image Switcher view to achieve this

This Link is usefull to you for better way to implement Android HorizontalScrollView to move image one by one.

Link :http://saigeethamn.blogspot.in/2010/05/image-switcher-view-android-developer.html

video: http://www.youtube.com/watch?v=c6a6wTfSPJA

EDIT : If you want to implement Complex way refer this Links

  1. Link1
  2. Link2
Dixit Patel
  • 3,190
  • 1
  • 24
  • 36
0

You'd be better served implementing this with a Gallery widget or a ViewPager. These elements handle the display and interaction portion for you; you just have to provide the data behind that. If these don't quite work for you, better to customize one of them then start all the way from scratch.

Gallery Docs

ViewPager Docs

devunwired
  • 62,780
  • 12
  • 127
  • 139
0

You can use any of below things for your need

Gallery - A view that shows items in a center-locked, horizontally scrolling list.

ViewPager -Layout manager that allows the user to flip left and right through pages of data. You supply an implementation of a PagerAdapter to generate the pages that the view shows.

HorizontalScrollView -Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display

for reference see these links - Gallery , ViewPager and HorizontalScrollView

AAnkit
  • 27,299
  • 12
  • 60
  • 71