How to adjust size of BottomSheet with Edittext and button below it?


April 2019


271 time


I want to build a BottomSheet to display a view with button and edit text. If I click on the Edittext the Keyboard shows up but it hides the button which is below the edit text. These pics should show my problems

1)BottomSheet in normal view-First Image

2)BottomSheet hides the button- Second Image

Here is my code for creating BottomSheet

addNewListBottomSheet = new BottomSheetDialog(this,;
        View bottomSheetRootView = getLayoutInflater().inflate(R.layout.addnewlist_bottomsheet_layout, null);

I also added a specific style

<style name="BottomSheet" parent="@style/Widget.Design.BottomSheet.Modal">
    <item name="android:background">@drawable/bottomsheet_round_bg</item>

<style name="BaseBottomSheetDialog" parent="@style/Theme.Design.Light.BottomSheetDialog">
    <item name="android:windowIsFloating">true</item>
    <item name="bottomSheetStyle">@style/BottomSheet</item>

<style name="BottomSheetDialogTheme" parent="BaseBottomSheetDialog">

i also tried to change the behavior with


but it doesn't work. Would appreciate an answer.

enter image description here

enter image description here

1 answers


Put all the content of the bottomsheet in the scrollview and try.

<ScrollView layout_behavior = "@string/bottom_sheet....">
<your layout/>