1

I was wondering how can I replicate the sideways gallery like the facebook mobile app but being able to scroll down the feed anytime I want.

I was thinking about "listening" for side-swypes and replacing the current ImageView but that doesn't sound like an elegant solution.

I searched for awhile and didn't find any library worth using

Is there any library or do you have any idea how to do it?

enter image description here

Cœur
  • 37,241
  • 25
  • 195
  • 267
cesarferreira
  • 1,578
  • 4
  • 24
  • 34

1 Answers1

1

You could use the ViewPager component. Reference: http://developer.android.com/reference/android/support/v4/view/ViewPager.html

Here are some tutorial that can help you get started:

1) http://androidtrainningcenter.blogspot.sg/2012/10/viewpager-example-in-android.html

2) http://manishkpr.webheavens.com/android-viewpager-as-image-slide-gallery-swipe-gallery/

Take a look at: similar question!

Community
  • 1
  • 1
Amulya Khare
  • 7,718
  • 2
  • 23
  • 38
  • PS: Amulya, do you know how to add a ViewPager programatically? – cesarferreira Oct 30 '13 at 06:10
  • @Amulya really nice answer. But can you please let me know what should i have to do if i want to look it exactly same as facebook slider? I mean the previous and next image should be display as it is displaying in the question. – Shreyash Mahajan Nov 28 '13 at 13:00