Closed saurabhdhillon closed 6 years ago
` final int currentItem = viewPager.getCurrentItem();
for (int i = 0; i < viewPager.getChildCount(); i++) { final View child = viewPager.getChildAt(i); final ViewPager.LayoutParams layoutParams = (ViewPager.LayoutParams) child.getLayoutParams(); if (!layoutParams.isDecor && currentItem == layoutParams.position) { return child; } } return null;`
layoutParams.position is a private field couldn't use this. Can you help
@laenger can you help?
ViewPager.LayoutParams.position is package private which is the reason why ViewPagerUtils is placed inside android.support.v4.view and not biz.laenger.android.vpbs
ViewPager.LayoutParams.position
ViewPagerUtils
android.support.v4.view
biz.laenger.android.vpbs
` final int currentItem = viewPager.getCurrentItem();
layoutParams.position is a private field couldn't use this. Can you help