Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android BottomSheetDialogFragment not opening fully on landscape

class MyBottomSheetFragment : BottomSheetDialogFragment() {
    //....
    override fun onStart() {
        super.onStart()
        //this forces the sheet to appear at max height even on landscape
        val behavior = BottomSheetBehavior.from(requireView().parent as View)
        behavior.state = BottomSheetBehavior.STATE_EXPANDED
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #android #BottomSheetDialogFragment #opening #fully #landscape
ADD COMMENT
Topic
Name
5+3 =