Current scroll position in CoordinatorLayout with CollapsingToolbarLayout

Viewed 218

I would like to scroll to the certain view when it becomes in focus.
I thought I could use onNestedScroll but the problem is that it takes only the distance to scroll, not the absolute scroll value.
So, I can get where the view is using getLocationInWindow but I don't know how to get the Y scroll of the entire layout. I tried to use AppBarLayout current offset, but it only shows the scroll on the collapsing toolbar.

0 Answers
Related