Description
Starting in 1.2.0-alpha05 my BottomSheet is still showing when initially set I the state to collapsed and peekHeight to 0. If I revert back to alpha04 (and all previous versions I have tried) I can successfully start the activity with the bottom sheet hidden by setting peek height to 0. After the activity is started I can set the peekHeight to 0 and it works, just not initially.
Expected behavior: I expect setting peekHeight to 0 to hide the bottom sheet.
Android API version: I'm testing with API version 29.
Material Library version: 1.2.0-alpha05
Device: Emulator and Pixel phones
Hi there! In 1.2.0-alpha05 we introduced a new peekheight based on insets api to prevent overlap with gesture insets on Android Q. Setting the _gestureInsetBottomIgnored_ attribute to true in your XML or by using the _setGestureInsetBottomIgnored()_ method with the boolean value true should resolve your issue! Would you try that and let me know if it works? Thanks 馃檪
Thanks @melaniegoetz , that fixed it for us!
@melaniegoetz That finally worked! I swear I tried that exact solution in both xml and in code before I reported this bug, but now I'm thinking maybe I didn't put the attribute on the correct tag, or something. Thanks for your help.
@melaniegoetz Thanks for this fix. I've had the issue that my BottomSheet's actual peekHeight changed depending which gesture mode the user has set in the system settings.
I.e. the peekHeight was set differently in all three different navigation modes: gestural, twobutton and threebutton.
With setting bottomSheetBehavior.isGestureInsetBottomIgnored = true the peekHeight is now the same, regardless which gesture mode is enabled.
Most helpful comment
Hi there! In 1.2.0-alpha05 we introduced a new peekheight based on insets api to prevent overlap with gesture insets on Android Q. Setting the _gestureInsetBottomIgnored_ attribute to true in your XML or by using the _setGestureInsetBottomIgnored()_ method with the boolean value true should resolve your issue! Would you try that and let me know if it works? Thanks 馃檪