Enable edge to edge
This commit is contained in:
parent
752a037380
commit
329b341325
3 changed files with 15 additions and 19 deletions
|
|
@ -3,6 +3,8 @@ package cn.super12138.todo.views
|
|||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.WindowManager
|
||||
import androidx.activity.SystemBarStyle
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import cn.super12138.todo.constant.GlobalValues
|
||||
|
|
@ -11,8 +13,8 @@ open class BaseActivity : AppCompatActivity() {
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
/*if (GlobalValues.springFestivalTheme) {
|
||||
setTheme(R.style.Theme_SpringFestival)
|
||||
}
|
||||
enableEdgeToEdge()*/
|
||||
}*/
|
||||
enableEdgeToEdge()
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
// 深色模式
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
<resources>
|
||||
|
||||
<style name="Theme.ToDo" parent="Base.Theme.ToDo">
|
||||
<!-- Transparent system bars for edge-to-edge. -->
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:windowLightStatusBar">?attr/isLightTheme</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.SpringFestival" parent="Base.Theme.SpringFestival">
|
||||
<!-- Transparent system bars for edge-to-edge. -->
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:windowLightStatusBar">?attr/isLightTheme</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
@ -53,7 +53,11 @@
|
|||
<item name="alertDialogTheme">@style/ToDo.M3AlertDialog</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.ToDo" parent="Base.Theme.ToDo" />
|
||||
<style name="Theme.ToDo" parent="Base.Theme.ToDo">
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:windowLightStatusBar">?attr/isLightTheme</item>
|
||||
</style>
|
||||
|
||||
<style name="AppPreferenceThemeOverlay" parent="@style/PreferenceThemeOverlay">
|
||||
<item name="switchPreferenceCompatStyle">@style/AppSwitchPreference</item>
|
||||
|
|
@ -122,4 +126,10 @@
|
|||
<item name="preferenceTheme">@style/AppPreferenceThemeOverlay</item>
|
||||
<item name="alertDialogTheme">@style/ToDo.M3AlertDialog</item>
|
||||
</style>
|
||||
<!--<style name="Theme.SpringFestival" parent="Base.Theme.SpringFestival">
|
||||
<!– Transparent system bars for edge-to-edge. –>
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:windowLightStatusBar">?attr/isLightTheme</item>
|
||||
</style>-->
|
||||
</resources>
|
||||
Loading…
Reference in a new issue