纯黑深色模式主界面失效问题 #83
This commit is contained in:
@@ -69,19 +69,14 @@ class App : Application() {
|
|||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
|
|
||||||
when (getPrefString("app_theme", "0")) {
|
if (getPrefString("app_theme", "0") == "11") {
|
||||||
"11" -> {
|
if (AppConfig.customMode == "accent")
|
||||||
if (AppConfig.customMode == "accent")
|
setTheme(R.style.ThemeOverlay_WhiteBackground)
|
||||||
setTheme(R.style.ThemeOverlay_WhiteBackground)
|
DynamicColors.applyToActivitiesIfAvailable(this, DynamicColorsOptions.Builder()
|
||||||
DynamicColors.applyToActivitiesIfAvailable(this, DynamicColorsOptions.Builder()
|
.setContentBasedSource(this.primaryColor)
|
||||||
.setContentBasedSource(this.primaryColor)
|
.build())
|
||||||
.build())
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AppConfig.pureBlack)
|
|
||||||
setTheme(R.style.ThemeOverlay_PureBlack)
|
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
FirebaseManager.init(this)
|
FirebaseManager.init(this)
|
||||||
CrashHandler(this)
|
CrashHandler(this)
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:background="?attr/colorSurface">
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
android:id="@+id/view_pager_main"
|
android:id="@+id/view_pager_main"
|
||||||
|
|||||||
Reference in New Issue
Block a user