Skip to content

Commit d64c1e8

Browse files
committed
Use bottom sheet dialog
1 parent b7703fb commit d64c1e8

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

app/src/main/java/org/sorz/lab/tinykeepass/keepass/OpenKeePassDialogFragment.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import android.view.View
66
import android.view.ViewGroup
77
import android.widget.ProgressBar
88
import android.widget.TextView
9-
import androidx.fragment.app.DialogFragment
9+
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
1010

1111
import org.sorz.lab.tinykeepass.R
1212

1313
/**
1414
* Open KeePassFile with a loading dialog.
1515
*/
16-
class OpenKeePassDialogFragment : DialogFragment() {
16+
class OpenKeePassDialogFragment : BottomSheetDialogFragment() {
1717

1818
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
1919
isCancelable = false

app/src/main/res/layout/activity_main.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
android:id="@+id/toolbar"
1515
android:layout_width="match_parent"
1616
android:layout_height="?attr/actionBarSize"
17-
app:theme="@style/AppTheme.AppBar"
18-
app:popupTheme="@style/AppTheme.AppBarPopup" />
17+
app:theme="@style/AppTheme.AppBar" />
1918

2019
</com.google.android.material.appbar.AppBarLayout>
2120

app/src/main/res/values/styles.xml

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
</style>
2020

2121
<style name="AppTheme.AppBar" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar" />
22-
<style name="AppTheme.AppBarPopup" parent="ThemeOverlay.AppCompat.DayNight.ActionBar" />
2322

2423
<style name="AppTheme.Transparent" parent="Theme.MaterialComponents.DayNight.Dialog">
2524
<item name="android:windowFrame">@null</item>

0 commit comments

Comments
 (0)