Archived
Added support for obeying system dark mode toggle on Android 10
This commit is contained in:
@@ -111,37 +111,27 @@
|
||||
app:layout_constraintStart_toStartOf="@+id/txtGreeting"
|
||||
app:layout_constraintTop_toTopOf="@+id/txtGreeting" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtDark"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/darkBackground"
|
||||
android:textColor="@color/colorText"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/txtGreeting"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtJustnice" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtRestart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nightMode"
|
||||
android:textColor="@color/colorHint"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/txtDark"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtDark" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/switchDark"
|
||||
<com.google.android.material.textfield.TextInputLayout android:id="@+id/darkModeDropDown"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="end|center"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/txtRestart"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/appTheme"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/txtDark"
|
||||
app:layout_constraintTop_toTopOf="@+id/txtDark" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/switchDisableGreeting">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/darkModeDropDownText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:editable="false"
|
||||
android:textColor="@color/colorText"
|
||||
android:textSize="14sp"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtCustomiseColours1"
|
||||
@@ -151,8 +141,8 @@
|
||||
android:text="@string/customiseColoursTitle"
|
||||
android:textColor="@color/colorText"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/txtRestart"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtRestart" />
|
||||
app:layout_constraintStart_toStartOf="@+id/txtJustnice"
|
||||
app:layout_constraintTop_toBottomOf="@+id/darkModeDropDown" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtCustomiseColours2"
|
||||
@@ -179,7 +169,7 @@
|
||||
app:layout_constraintBottom_toTopOf="@+id/txtNotifications"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtRestart" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/darkModeDropDown" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtNotifications"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<CheckedTextView android:id="@android:id/text1"
|
||||
style="?android:attr/spinnerDropDownItemStyle"
|
||||
android:singleLine="true"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android" />
|
||||
@@ -141,4 +141,14 @@
|
||||
<string name="notReceivingNotifications1">Benachrichtigungen kommen nicht an?</string>
|
||||
<string name="notReceivingNotifications2">Klick hier um zu sehen, warum</string>
|
||||
<string name="notReceivingNotificationsHelp">Bemerke, dass diese Tipps insbesondere auf Huawei/Honor-Geräten nicht funktionieren könnten. Du kannst sie trotzdem ausprobieren.\n\nAkkusparfunktionen können dazu führen, dass Benachrichtigungen nicht ankommen. Versuche, Akkusparmodi auf deren Standardeinstellung zu setzen.\n\nEinige Geräte beschränken Apps im Hintergrund. Suche in deinen Geräteeinstellungen unter Apps die Vertretungsplan-App und schaue dann nach einer Einstellung namens \"Hintergrund-Services beschränken\" (oder ähnlich) und stelle sicher, dass diese ausgestellt ist.\n\nBei Schwierigkeiten kann ich auch gerne helfen.</string>
|
||||
<string name="appTheme">App-Design</string>
|
||||
<string-array name="themes">
|
||||
<item>Hell</item>
|
||||
<item>Dunkel</item>
|
||||
<item>System folgen</item>
|
||||
</string-array>
|
||||
<string-array name="themesPreQ">
|
||||
<item>Hell</item>
|
||||
<item>Dunkel</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<bool name="isLight">false</bool>
|
||||
</resources>
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<bool name="isTablet">false</bool>
|
||||
<bool name="isLight">true</bool>
|
||||
</resources>
|
||||
@@ -155,4 +155,14 @@
|
||||
<string name="notReceivingNotifications1">Not receiving notifications?</string>
|
||||
<string name="notReceivingNotifications2">Click to see why</string>
|
||||
<string name="notReceivingNotificationsHelp">Note: on Huawei/Honor devices, there may not be a solution to this problem. You\'re welcome to try the tips provided.\n\nBattery saver functions often cause notifications to be delayed or not be received at all. Try setting any battery saving options to their default setting.\n\nSome devices restrict background usage of apps. Please go to your device app settings, select the app and check for a toggle named \"Restrict background usage\" (or similar) and verify that the setting is turned off.\n\nYou\'re also welcome to ask me for help.</string>
|
||||
<string name="appTheme">App theme</string>
|
||||
<string-array name="themes">
|
||||
<item>Light</item>
|
||||
<item>Dark</item>
|
||||
<item>Follow system</item>
|
||||
</string-array>
|
||||
<string-array name="themesPreQ">
|
||||
<item>Light</item>
|
||||
<item>Dark</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<resources>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<style name="SelectableItemTheme">
|
||||
<item name="colorControlHighlight">@color/colorAccent</item>
|
||||
@@ -15,6 +15,10 @@
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="android:fontFamily">@font/manrope_medium</item>
|
||||
<item name="android:colorEdgeEffect">@color/colorAccent</item>
|
||||
<item name="android:navigationBarColor">@color/colorBackground</item>
|
||||
<item name="android:statusBarColor">@color/colorBackground</item>
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="23">@bool/isLight</item>
|
||||
<item name="android:windowLightNavigationBar" tools:targetApi="27">@bool/isLight</item>
|
||||
</style>
|
||||
|
||||
<style name="AlertDialog" parent="Theme.MaterialComponents.Light.Dialog.Alert">
|
||||
|
||||
Reference in New Issue
Block a user