-1

Photos in this layout can be swiped left and right, and swipe should be 'intelligent', like switching between photos and NOT like just horizontal scrolling of photos.

2 implementations that come to my mind:

  1. HorizontalScrollView (but swiping is dumb)
  2. ViewPager (but there is no way to see adjacent photos)

So, basicly I need a ViewPager for photos that can show adjacent photos. Is there a robust solution for this?

Layout

Community
  • 1
  • 1
agamov
  • 4,407
  • 1
  • 27
  • 31

3 Answers3

0

For cool swiping action viewpager is the best. And you won't have problems with memory. BUT I have no idea how to make view pager part of listview.

Roman Bugaian
  • 354
  • 1
  • 7
  • 22
  • and how can I see adjacent photos (pages) in ViewPager? – agamov Feb 21 '13 at 15:42
  • @agamov try making for each image a fragment and show it by viewpager. OR you can make a gallery. Here is some information about horizontal scrollview and listview http://stackoverflow.com/questions/10617126/horizontal-listview – Roman Bugaian Feb 21 '13 at 15:48
0

If you have final number of items you can use Android Gallery widget which is deprecated since api 16 but does exactly what you need, the main problem is that it cant reuse gallery items inside the adapter.

You also can try this: Horizontal list view

Evgeni Roitburg
  • 1,958
  • 21
  • 33
0

I have used TwoWayView to implement my layout. It's better than HorizontalView, cause it re-uses views (like ListView).

agamov
  • 4,407
  • 1
  • 27
  • 31