Skip to content

Commit

Permalink
Enable edge to edge
Browse files Browse the repository at this point in the history
  • Loading branch information
Super12138 committed May 19, 2024
1 parent 752a037 commit 329b341
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
6 changes: 4 additions & 2 deletions app/src/main/kotlin/cn/super12138/todo/views/BaseActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

// 深色模式
Expand Down
16 changes: 0 additions & 16 deletions app/src/main/res/values-v23/themes.xml

This file was deleted.

12 changes: 11 additions & 1 deletion app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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">
&lt;!&ndash; Transparent system bars for edge-to-edge. &ndash;&gt;
<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>

0 comments on commit 329b341

Please sign in to comment.