mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 10:51:52 +01:00
Upping to Material lib 1.4.0 beta
Which has tablet changes for the bottom sheets and makes it easier to do edge2edge for bottom sheets
This commit is contained in:
parent
1fba86886c
commit
b3646b8f5f
@ -97,7 +97,7 @@ dependencies {
|
||||
// Android X libraries
|
||||
implementation("androidx.appcompat:appcompat:1.3.0-rc01")
|
||||
implementation("androidx.cardview:cardview:1.0.0")
|
||||
implementation("com.google.android.material:material:1.3.0")
|
||||
implementation("com.google.android.material:material:1.4.0-beta01")
|
||||
implementation("androidx.recyclerview:recyclerview:1.2.0")
|
||||
implementation("androidx.preference:preference:1.1.1")
|
||||
implementation("androidx.annotation:annotation:1.2.0")
|
||||
|
@ -31,20 +31,12 @@ abstract class E2EBottomSheetDialog<VB : ViewBinding>(activity: Activity) :
|
||||
|
||||
val contentView = binding.root
|
||||
|
||||
window?.setBackgroundDrawable(null)
|
||||
window?.navigationBarColor = activity.window.navigationBarColor
|
||||
val isLight = (activity.window?.decorView?.systemUiVisibility ?: 0) and View
|
||||
.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR == View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && isLight) {
|
||||
window?.decorView?.systemUiVisibility = View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
|
||||
}
|
||||
window?.findViewById<View>(com.google.android.material.R.id.container)?.fitsSystemWindows =
|
||||
false
|
||||
window?.findViewById<View>(com.google.android.material.R.id.coordinator)?.fitsSystemWindows =
|
||||
false
|
||||
contentView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View
|
||||
.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||
|
||||
val insets = activity.window.decorView.rootWindowInsets
|
||||
(contentView.parent as View).background = null
|
||||
contentView.post {
|
||||
|
@ -185,6 +185,7 @@
|
||||
<item name="android:windowIsFloating">false</item>
|
||||
<item name="android:colorBackground">@android:color/transparent</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="enableEdgeToEdge">true</item>
|
||||
</style>
|
||||
|
||||
<style name="OverflowDialogTheme" parent="BottomSheetDialogTheme">
|
||||
|
Loading…
Reference in New Issue
Block a user