-
Notifications
You must be signed in to change notification settings - Fork 106
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
Nested Scrolling support #28
Comments
This is an interesting problem. I think that what you wrote about nested scrolling makes a perfect starting point. One should probably look into how |
Also, if you decide to file a bug to Google, reference it here, please. |
I tried to use this library with a
RecyclerView
inside of aCoordinatorLayout
that also contains aAppBarLayout
with aToolbar
that usesapp:layout_scrollFlags="scroll|enterAlways|snap"
:This has the following problems:
FastScroller
isn't collapsing/expanding theAppBarLayout
FastScroller
to scroll to the last entry in the list if theAppBarLayout
is expandedFastScroller
are not visible (I quick fixed this problem with usingmarginTop
/marginBottom
for theFastScroller
)It seems that
RecyclerView
doesn't handle Nested Scrolling if you scroll withscrollToPosition
. Sadly I couldn't find any proper documentation how Nested Scrolling is supposed to work. So I can't say if this is a bug inRecyclerView
or this is supposed to be handled by the scroll initiator. But I think it is possible to handle it with:ViewCompat.startNestedScroll
ViewCompat.dispatchNestedPreScroll
RecyclerView.scrollBy
ViewCompat.dispatchNestedScroll
ViewCompat.stopNestedScroll
This snippet demonstrates a way that let's the
RecyclerView
scroll by 300px while also collapsing theAppBarLayout
. However I don't know this is the proper way to do it:I'm not sure if it is possible to fix this problem with the current approach in this lib to scroll with
scrollToPosition
.The text was updated successfully, but these errors were encountered: