Android Open BottomSheet DialogFragment in Expanded mode by default.


BottomSheet DialogFragment opens up in STATE_COLLAPSED by default. Which can be forced to open to STATE_EXPANDEDand take up the full device screen with help of the following code template.

@NonNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) {

    BottomSheetDialog dialog = (BottomSheetDialog) super.onCreateDialog(savedInstanceState);

    dialog.setOnShowListener(new DialogInterface.OnShowListener() {
        public void onShow(DialogInterface dialog) {
            BottomSheetDialog d = (BottomSheetDialog) dialog;

            FrameLayout bottomSheet = (FrameLayout) d.findViewById(;

    // Do something with your dialog like setContentView() or whatever
    return dialog;

Although dialog animation is slightly noticeable but does the task of opening the DialogFragment in full screen very well.