i use the ViewPager for switching views with left/right swipe.
The ViewPager needs an Adapter, so I\'ve built this one:
public class ListViewPagerAda
Am I missing something? There's only ever 3 children inside the ViewGroup, so it boils down to:
int current = viewPager.getCurrentItem();
int childCount = viewPager.getChildCount();
// If there's a single page or we're at the beginning, return the first view
if (childCount == 1 || current == 0) {
return viewPager.getChildAt(0);
} else { //For any other case, we want the second child. This is either the last page or the page in the middle for any other case.
return viewPager.getChildAt(1);
}