How to achieve custom dialog at the bottom of the screen in Android
Try this
BottomSheetDialog dialog = new BottomSheetDialog(YourActivity.this);dialog.setContentView(YourView);dialog.show();
Edit: I didn't there was a built in component in Android to do so. Good to know! Also, check this out:
I would recommend FragmentDialog
without a doubt.
It's so much easier to create a customized Dialog
regarding location & layout design.
Kotlin code for run custom ButtomSheetDialog (run inside Activity)
var CustomSelectProfilePicBottomSheetDialog = BottomSheetDialog(this) val layoutButtomSheetView = this.layoutInflater.inflate(R.layout.ly_custom_buttom_sheet_frg_dialog, null) CustomSelectProfilePicBottomSheetDialog.setContentView(layoutButtomSheetView) CustomSelectProfilePicBottomSheetDialog.show()