Open kibotu opened 5 years ago
@kibotu were you able to solve this? I'm having this same problem now, and can't fix it :(
not exactly, i kind of ended up manually adding bottom padding to the recyclerview :/ which does not work particularly well with different recyclerview items and / or in case they change height by e.g. collapsing / expanding
I ran into a similar situation my solution is to use marginButton to the recycler view
Description:
When BottomSheetBehavior is in STATE_HALF_EXPANDED and AppBarLayout/CollapsingToolbarLayout has layout_scrollFlags="scroll", the bottom sheet won't scroll up / expand the bottom sheet view when RecyclerView has reached its end when the CollapsingToolbarLayout has expanded its content. (everything works fine if BottomSheetBehavior expanded or peek height)
Also RecyclerView has not correct size at the end. e.g. only 27 / 30 items would be possible to scroll up. looks like the RecyclerView has the wrong size or is not full scrolled up
Looks like the RecyclerView consumes all scrolling events, because touching the expanded CollapsingToolbarLayout view scrolls the BottomSheetBehavior view successfully up.
Expected behavior:
While the BottomSheetBehavior is in STATE_HALF_EXPANDED and the user scrolls up, the RecyclerView should scroll the last item into visible view port and after that the bottom sheet should expand. (which it does unless there is a scroll flag set)
Source code:
Android API version: 29
Material Library version: com.google.android.material:material:1.1.0-alpha08
Device: Samsung Galaxy S9