+ 1

How to make bottom sheet not to go peek height?

hi i want to know how to make bottom sheet not to go to peek height when a component is added dynamically to it in android

3rd Apr 2018, 8:35 PM
Vijeth Belle
Vijeth Belle - avatar
1 Answer
+ 5
You can use the BottomSheetBehavior's public method – setPeekHeight() in your code: BottomSheetDialog dialog = new BottomSheetDialog(content); dialog.setContentView(view); BottomSheetBehavior mBehavior = BottomSheetBehavior.from((View) view.getParent()); mBehavior.setPeekHeight(your_dialog_height); dialog.show(); Check the other ways to do it here: https://stackoverflow.com/questions/35685681/dynamically-change-height-of-bottomsheetbehavior/35804525 In addition, check the public methods here: https://developer.android.com/reference/android/support/design/widget/BottomSheetBehavior.html
4th Apr 2018, 2:57 AM
Dev
Dev - avatar