How to achieve custom dialog at the bottom of the screen in Android

Mithun Kumar picture Mithun Kumar · Feb 18, 2017 · Viewed 24.6k times · Source

Which component do I choose to achieve custom dialog at the bottom as shown in the below image? Shall I choose alertdialog,popupwindow, or fragmentdialog?

dialogAtBottom

Answer

ak sacha picture ak sacha · Feb 18, 2017

Try this

BottomSheetDialog dialog = new BottomSheetDialog(YourActivity.this);
dialog.setContentView(YourView);

dialog.show();