Creating Custom Bottom Sheet Dialog

BottomSheet dialog is a beautiful view of the android application.
mostly bottom sheet dialog is used to show some content which can be a swipe up and down.

Here you can check how to implement custom bottom dialog.

1- Create an android project
2- Do the following changes in your style.xml under res.


download full source code of the custom bottom dialog sheet.
Github Link

<style name="CustomBottomSheetDialogTheme" 
    <item name="bottomSheetStyle">

<style name="CustomBottomSheetStyle"
<item name="android:background">

3- create a blank fragment and extend it with BottomSheetDialogFragment

FilterBottomfragment extends BottomSheetDialogFragment

4- inflate your custom layout within fragment like this

public View onCreateView(@NonNull LayoutInflater inflater,
@Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {

//inflate your custom layout in place of bottom_dialog
View view=inflater.inflate(R.layout.bottom_dialog,container,false);
return view;

5- apply the style in fragment's onCreate() like this

public void onCreate(@Nullable Bundle savedInstanceState) {

6- open the dialog on clicking of a button or on any event

btnOpenDialog.setOnClickListener(new View.OnClickListener()
public void onClick(View v) {
FilterBottomfragment filterBottomFragment = new FilterBottomfragment();
//set filterBottomFragment.setCancelable(true)
//if you want to cancel on touch out side;

1 comment:

  1. As a outcome, companies can tap into a brand new} market not obtainable in conventional slots with 3D Game Development. Buying a slot sport 토토사이트 allows you to become the owner of the software. Thus, you can to|you probably can} have the same benefits as a enterprise operating a slot sport, like a share of the profits. Games that supply the participant something to collect or progress course of|in direction of}. Goal-oriented games that supply a reason to play and a reason to stay. Because of the "inventory", "renchan", and tenjō techniques, it is possible to earn cash by simply taking part in} machines on which somebody has simply misplaced a huge amount of cash.