How to implement left and right swipe gesture in android.

android

Solution

This functionality is given by ViewPager class: http://developer.android.com/reference/android/support/v4/view/ViewPager.html

Alternatively, when you create a new Android application with Eclipse, after clicking "Next" a few times before you click "Finish", there is an option "Navigation Type". Select "Fixed Tabs+Swipe" or "Scrollable tabs+Swipe" and Android will create the sample codes for you right away.

Problem

I am new with android.I want to implement right and left swipe functionality with my app. So when I swipe left next fruit picture will come and when I swipe right again previous one display. How can I get that functionality with android?. Thanks In advance...

Original source

Related problems