I have a bottomsheet in my activity and when I set state to BottomSheetBehavior.STATE_EXPANDED It work's with no problem until the height of bottomsheet is less than half of the screen. when height of bottomsheet is grater than half of the screen it also will expand but no with slideoffset 1.0. I added a bottomsheet callback with addBottomSheetCallback to find out what's going on and this is the result: 1- I set state to BottomSheetBehavior.STATE_EXPANDED 2- onStateChanged show state is BottomSheetBehavior.STATE_EXPANDED and onSlide show slideoffset is 0.81 3- I try to drag bottomsheet up and then onStateChanged show state is STATE_SETTLING and slideoffset increasing 4- finally I have BottomSheetBehavior.STATE_EXPANDED on state and 1.0 on onSlide
BottomSheetBehavior.STATE_EXPANDED
1.0
addBottomSheetCallback
onStateChanged
onSlide
slideoffset
0.81
STATE_SETTLING
How could I achieve step 4 directly?
2.1m questions
2.1m answers
60 comments
57.0k users