I have a ViewPager, and I\'d like to get the current selected and visible view, not a position.
getChildAt(getCurrentItem)
returns wrong Vi
If you examine carefully, there are at most 3 views saved by ViewPager. You can easily get the current view by
view = MyActivity.mViewPager.getChildAt(1);
I just came across the same issue and resolved it by using:
View view = MyActivity.mViewPager.getFocusedChild();
I'm using ViewPagerUtils from FabulousFilter:
ViewPagerUtils.getCurrentView(ViewPager viewPager)