File tree Expand file tree Collapse file tree
AnkiDroid/src/main/java/com/ichi2/anki Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,10 +26,12 @@ import androidx.core.os.BundleCompat
2626import androidx.core.os.bundleOf
2727import androidx.fragment.app.FragmentManager
2828import androidx.fragment.app.commit
29+ import com.google.android.material.bottomsheet.BottomSheetBehavior
2930import com.google.android.material.bottomsheet.BottomSheetDialogFragment
3031import com.ichi2.anki.PermissionSet
3132import com.ichi2.anki.R
3233import com.ichi2.anki.databinding.PermissionsBottomSheetBinding
34+ import com.ichi2.anki.utils.ext.behavior
3335import dev.androidbroadcast.vbpd.viewBinding
3436
3537/* *
@@ -56,6 +58,11 @@ class PermissionsBottomSheet : BottomSheetDialogFragment() {
5658 ) {
5759 super .onViewCreated(view, savedInstanceState)
5860
61+ this .behavior.apply {
62+ state = BottomSheetBehavior .STATE_EXPANDED
63+ skipCollapsed = true
64+ }
65+
5966 binding.closeButton.setOnClickListener { dismiss() }
6067 childFragmentManager.setFragmentResultListener(DISMISS_RESULT_REQUEST_KEY , this ) { _, _ ->
6168 dismiss()
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2026 David Allison <davidallisongithub@gmail.com>
3+ *
4+ * This program is free software; you can redistribute it and/or modify it under
5+ * the terms of the GNU General Public License as published by the Free Software
6+ * Foundation; either version 3 of the License, or (at your option) any later
7+ * version.
8+ *
9+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY
10+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License along with
14+ * this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+ package com.ichi2.anki.utils.ext
18+
19+ import com.google.android.material.bottomsheet.BottomSheetBehavior
20+ import com.google.android.material.bottomsheet.BottomSheetDialogFragment
21+
22+ val BottomSheetDialogFragment .behavior
23+ get() =
24+ BottomSheetBehavior
25+ .from(
26+ requireDialog()
27+ .findViewById(com.google.android.material.R .id.design_bottom_sheet)!! ,
28+ )
You can’t perform that action at this time.
0 commit comments