mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-24 19:27:27 +00:00
Merge 8ef46ec39b
into e6ed939952
This commit is contained in:
commit
0c4b4044db
3 changed files with 7 additions and 13 deletions
|
@ -46,10 +46,8 @@ class ProfileDialog : BottomSheetDialogFragment() {
|
||||||
binding.profileList.addItemDecoration(divider)
|
binding.profileList.addItemDecoration(divider)
|
||||||
|
|
||||||
// You can't expand a bottom sheet with a controller/remote/other non-touch devices
|
// You can't expand a bottom sheet with a controller/remote/other non-touch devices
|
||||||
val behavior: BottomSheetBehavior<View> = BottomSheetBehavior.from(view.parent as View)
|
BottomSheetBehavior.from<View>(view.parent as View).state =
|
||||||
if (!resources.getBoolean(R.bool.hasTouch)) {
|
BottomSheetBehavior.STATE_EXPANDED
|
||||||
behavior.state = BottomSheetBehavior.STATE_EXPANDED
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
|
|
|
@ -38,10 +38,8 @@ class AboutDialogFragment : BottomSheetDialogFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
if (!resources.getBoolean(R.bool.hasTouch)) {
|
BottomSheetBehavior.from<View>(view.parent as View).state =
|
||||||
BottomSheetBehavior.from<View>(view.parent as View).state =
|
BottomSheetBehavior.STATE_EXPANDED
|
||||||
BottomSheetBehavior.STATE_EXPANDED
|
|
||||||
}
|
|
||||||
|
|
||||||
val wark = resources.getString(R.string.wark)
|
val wark = resources.getString(R.string.wark)
|
||||||
val branch = String.format(
|
val branch = String.format(
|
||||||
|
|
|
@ -44,11 +44,9 @@ class GridOptionDialogFragment : BottomSheetDialogFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
// Pins fragment to the top of the dialog ensures the dialog is expanded in landscape by default
|
// Ensure the dialog is expanded in landscape by default
|
||||||
if (!resources.getBoolean(R.bool.hasTouch)) {
|
BottomSheetBehavior.from<View>(view.parent as View).state =
|
||||||
BottomSheetBehavior.from<View>(view.parent as View).state =
|
BottomSheetBehavior.STATE_EXPANDED
|
||||||
BottomSheetBehavior.STATE_EXPANDED
|
|
||||||
}
|
|
||||||
|
|
||||||
if (activity is AppCompatActivity) {
|
if (activity is AppCompatActivity) {
|
||||||
setUpCoverButtons()
|
setUpCoverButtons()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue