Start a Project

How to implement Bottom Sheet fragment in Android

How to implement Bottom Sheet fragment

If you want to show a different type of bottom sheets in the same activity or want to make reusable bottom sheet the should use BottomSheetDialogFragment. The process for this is very similar to that of making a DialogFragment. As in any DialogFragment, Firstly you have to create a layout file for implement Bottom Sheet fragment

bottom_sheet_fragment.xml

Secondly comes to the JAVA file. For making a modal type of bottom sheet, you will have to extend BottomSheetDialogFragment and set the custom view.

MyBottomSheetFragment.java

MainActivity.java
Exit mobile version