main activity tests

This commit is contained in:
X1nto 2020-05-14 01:30:46 +04:00
parent 0b1ebbf72f
commit a22a9a0f6c
3 changed files with 8 additions and 4 deletions

View File

@ -66,7 +66,12 @@ open class ThemeActivity : AppCompatActivity() {
Configuration.UI_MODE_NIGHT_NO -> setLightAccent(currentAccent)
}
}
else -> setLightAccent("Blue")
else -> {
when (resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) {
Configuration.UI_MODE_NIGHT_YES -> setDarkAccent(currentAccent)
Configuration.UI_MODE_NIGHT_NO -> setLightAccent(currentAccent)
}
}
}
}

View File

@ -3,10 +3,10 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/container"
android:background="?colorSurface"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--
<fragment
android:id="@+id/bottom_nav_host"
android:name="androidx.navigation.fragment.NavHostFragment"
@ -15,6 +15,7 @@
android:layout_below="@id/home_appbar"
app:defaultNavHost="true"
app:navGraph="@navigation/mobile_navigation"/>
-->
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/home_appbar"

View File

@ -12,7 +12,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="4dp"
android:clipToPadding="false"
android:orientation="vertical">
<include
@ -53,7 +52,6 @@
android:layout_marginTop="@dimen/stdp"
android:layout_marginEnd="@dimen/stdp" />
<include
android:id="@+id/home_useful_links_wrapper"
layout="@layout/include_useful_links"