Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get actual current position of the page #52

Open
vinayappypiellp opened this issue Oct 10, 2019 · 1 comment
Open

Get actual current position of the page #52

vinayappypiellp opened this issue Oct 10, 2019 · 1 comment

Comments

@vinayappypiellp
Copy link

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)
}

@narendrappal
Copy link

@vinayappypiellp
you can get the current position by InfiniteViewPager's getCurrentItem() method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants