What is the best way to switch (slide) images (with fingers) like launcher does?
-
25-06-2021 - |
문제
I have some images and I want to slide through them (just like in launcher or gallery (with fingers)). What is more I need to zoom those images. I have readen about this and many people recommend using ViewPager. Is that a good idea in my situation? Implemantation of ViewPager is quite hard, because I need to make an adapter to it. The number of images depends on situation and is not fixed. Is it a problem? Maybe using ViewFlipper with animations and gestures reader would be better? What do you think? Thanks for answers!
해결책
Use ViewPager. It is the best way to achieve this.
http://code.google.com/p/android-mt-tutorials/source/browse/trunk/SimpleViewPager/?r=10
Will provide a good explanation.
Also you can also use it with http://viewpagerindicator.com/
You can see the effect in action there and download the sample app.