xxxxxxxxxx
val dialog = super.onCreateDialog(savedInstanceState)
dialog.setOnShowListener {
val bottomSheetDialog = it as BottomSheetDialog
val parentLayout = bottomSheetDialog.findViewById<View>(
com.google.android.material.R.id.design_bottom_sheet
)
parentLayout?.let { bottomSheet ->
val behaviour = BottomSheetBehavior.from(bottomSheet)
val layoutParams = bottomSheet.layoutParams
layoutParams.height = WindowManager.LayoutParams.MATCH_PARENT
bottomSheet.layoutParams = layoutParams
behaviour.state = BottomSheetBehavior.STATE_EXPANDED
}
}
return dialog
xxxxxxxxxx
val dialog = super.onCreateDialog(savedInstanceState)
dialog.setOnShowListener {
val bottomSheetDialog = it as BottomSheetDialog
val parentLayout = bottomSheetDialog.findViewById<View>(
com.google.android.material.R.id.design_bottom_sheet
)
parentLayout?.let { bottomSheet ->
val behaviour = BottomSheetBehavior.from(bottomSheet)
val layoutParams = bottomSheet.layoutParams
layoutParams.height = WindowManager.LayoutParams.MATCH_PARENT
bottomSheet.layoutParams = layoutParams
behaviour.state = BottomSheetBehavior.STATE_EXPANDED
}
}
return dialog
xxxxxxxxxx
BottomSheetBehavior.from(bottomSheet).setState(BottomSheetBehavior.STATE_EXPANDED);
xxxxxxxxxx
val dialog = super.onCreateDialog(savedInstanceState)
dialog.setOnShowListener {
val bottomSheetDialog = it as BottomSheetDialog
val parentLayout = bottomSheetDialog.findViewById<View>(
com.google.android.material.R.id.design_bottom_sheet
)
parentLayout?.let { bottomSheet ->
val behaviour = BottomSheetBehavior.from(bottomSheet)
val layoutParams = bottomSheet.layoutParams
layoutParams.height = WindowManager.LayoutParams.MATCH_PARENT
bottomSheet.layoutParams = layoutParams
behaviour.state = BottomSheetBehavior.STATE_EXPANDED
}
}
return dialog
xxxxxxxxxx
val dialog = super.onCreateDialog(savedInstanceState)
dialog.setOnShowListener {
val bottomSheetDialog = it as BottomSheetDialog
val parentLayout = bottomSheetDialog.findViewById<View>(
com.google.android.material.R.id.design_bottom_sheet
)
parentLayout?.let { bottomSheet ->
val behaviour = BottomSheetBehavior.from(bottomSheet)
val layoutParams = bottomSheet.layoutParams
layoutParams.height = WindowManager.LayoutParams.MATCH_PARENT
bottomSheet.layoutParams = layoutParams
behaviour.state = BottomSheetBehavior.STATE_EXPANDED
}
}
return dialog
xxxxxxxxxx
val dialog = super.onCreateDialog(savedInstanceState)
dialog.setOnShowListener {
val bottomSheetDialog = it as BottomSheetDialog
val parentLayout = bottomSheetDialog.findViewById<View>(
com.google.android.material.R.id.design_bottom_sheet
)
parentLayout?.let { bottomSheet ->
val behaviour = BottomSheetBehavior.from(bottomSheet)
val layoutParams = bottomSheet.layoutParams
layoutParams.height = WindowManager.LayoutParams.MATCH_PARENT
bottomSheet.layoutParams = layoutParams
behaviour.state = BottomSheetBehavior.STATE_EXPANDED
}
}
return dialog
xxxxxxxxxx
val dialog = super.onCreateDialog(savedInstanceState)
dialog.setOnShowListener {
val bottomSheetDialog = it as BottomSheetDialog
val parentLayout = bottomSheetDialog.findViewById<View>(
com.google.android.material.R.id.design_bottom_sheet
)
parentLayout?.let { bottomSheet ->
val behaviour = BottomSheetBehavior.from(bottomSheet)
val layoutParams = bottomSheet.layoutParams
layoutParams.height = WindowManager.LayoutParams.MATCH_PARENT
bottomSheet.layoutParams = layoutParams
behaviour.state = BottomSheetBehavior.STATE_EXPANDED
}
}
return dialog
xxxxxxxxxx
val dialog = super.onCreateDialog(savedInstanceState)
dialog.setOnShowListener {
val bottomSheetDialog = it as BottomSheetDialog
val parentLayout = bottomSheetDialog.findViewById<View>(
com.google.android.material.R.id.design_bottom_sheet
)
parentLayout?.let { bottomSheet ->
val behaviour = BottomSheetBehavior.from(bottomSheet)
val layoutParams = bottomSheet.layoutParams
layoutParams.height = WindowManager.LayoutParams.MATCH_PARENT
bottomSheet.layoutParams = layoutParams
behaviour.state = BottomSheetBehavior.STATE_EXPANDED
}
}
return dialog
xxxxxxxxxx
val dialog = super.onCreateDialog(savedInstanceState)
dialog.setOnShowListener {
val bottomSheetDialog = it as BottomSheetDialog
val parentLayout = bottomSheetDialog.findViewById<View>(
com.google.android.material.R.id.design_bottom_sheet
)
parentLayout?.let { bottomSheet ->
val behaviour = BottomSheetBehavior.from(bottomSheet)
val layoutParams = bottomSheet.layoutParams
layoutParams.height = WindowManager.LayoutParams.MATCH_PARENT
bottomSheet.layoutParams = layoutParams
behaviour.state = BottomSheetBehavior.STATE_EXPANDED
}
}
return dialog
xxxxxxxxxx
val dialog = super.onCreateDialog(savedInstanceState)
dialog.setOnShowListener {
val bottomSheetDialog = it as BottomSheetDialog
val parentLayout = bottomSheetDialog.findViewById<View>(
com.google.android.material.R.id.design_bottom_sheet
)
parentLayout?.let { bottomSheet ->
val behaviour = BottomSheetBehavior.from(bottomSheet)
val layoutParams = bottomSheet.layoutParams
layoutParams.height = WindowManager.LayoutParams.MATCH_PARENT
bottomSheet.layoutParams = layoutParams
behaviour.state = BottomSheetBehavior.STATE_EXPANDED
}
}
return dialog