Bottom sheet with lot of content will cover whole screen. So can or should possibility adding such a maximum height? So I do this...
BottomSheet build = new BottomSheet.Builder(this) .setSheet(R.menu.bulk_option_menu) .setListener(this) .grid() .create(); ViewGroup.LayoutParams param = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,200); build.getLayout().setLayoutParams(param);
But setlayoutparam returning java.lang.NullPointerException
The layout has not been created yet until the dialog is shown. I would set the layout params in the onSheetShown(BottomSheet bottomSheet, Object object) method of the listener
Bottom sheet with lot of content will cover whole screen. So can or should possibility adding such a maximum height? So I do this...
BottomSheet build = new BottomSheet.Builder(this) .setSheet(R.menu.bulk_option_menu) .setListener(this) .grid() .create(); ViewGroup.LayoutParams param = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,200); build.getLayout().setLayoutParams(param);
But setlayoutparam returning java.lang.NullPointerException