InfiniteViewPager
InfiniteViewPager copied to clipboard
Get actual current position of the page
Is there any metghod to get actual current position method, pager.getCurrentRealPosition() is not providing me actual position, and i have call setCurrentRealPosition at last of currentItem method.
override fun setCurrentItem(item: Int, smoothScroll: Boolean) { var item = item if (adapter!!.count == 0) { super.setCurrentItem(item, smoothScroll) return } item = offsetAmount + item % adapter!!.count super.setCurrentItem(item, smoothScroll) setRealCurrentItem(item, true) }
@vinayappypiellp you can get the current position by InfiniteViewPager's getCurrentItem() method