0

I'm trying to fling a view object (e.g an image) from left to right. First I used Gallery with a custom adapter. Then I tried ViewPager. I couldn't decide which one has a better performance. I guess ViewPager is better. By the way, I read about viewanimator, but could not understand whether it can be used for same purpose. Does it also provide some animation during fling?

Which one do you suggest?

Also i'm looking for "something" that shows the index of the flinging object with dots below. Clicking the dot, shows the relevant object. Are there any ready widget for this purpose?

Thanks a lot,

efeyc
  • 2,122
  • 2
  • 27
  • 39

2 Answers2

1

Try using HorizontalPager for that, it uses a GroupView and implements all the things you need. It also has an example of the dot thing you want.

Here's the link: https://github.com/ysamlan/horizontalpager

Androider
  • 724
  • 3
  • 12
  • The dot thing was not the thing that i want, but i used HorizontalPager. Thanks. – efeyc Aug 03 '11 at 12:19
  • 4
    Taken from the project provided: "((NOTE)) This library is obsoleted by Google's release of their own ViewPager library as part of the Android Compatibility Package, revision 3. I would recommend using that for any new development." – pablisco Feb 28 '12 at 15:37
1

Here's a tutorial for a gallery integration below a ViewPager i wrote: http://responsiveandroid.com/2012/01/26/android-viewpager-and-gallery-integration.html . clicking on gallery items will page the ViewPager to the corresponding image. You can use the ViewPager indicator https://github.com/JakeWharton/Android-ViewPagerIndicator that has small circles to indicate which view you are on.

browep
  • 5,057
  • 5
  • 29
  • 37