Voeg thema-selector toe (DayNight, Radiogroep, teal accent)
This commit is contained in:
parent
5a0dee77b3
commit
c977dc25a2
5 changed files with 201 additions and 24 deletions
|
|
@ -38,6 +38,59 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:text="Firmware Flashen" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?android:attr/listDivider"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/section_theme"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/themeGroup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/themeSystem"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/theme_system" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/themeLight"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/theme_light" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/themeDark"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/theme_dark" />
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
|
|
|
|||
6
android/app/src/main/res/values-night/colors.xml
Normal file
6
android/app/src/main/res/values-night/colors.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#4DB6AC</color>
|
||||
<color name="colorPrimaryDark">#00897B</color>
|
||||
<color name="colorAccent">#80CBC4</color>
|
||||
</resources>
|
||||
6
android/app/src/main/res/values/colors.xml
Normal file
6
android/app/src/main/res/values/colors.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#00695C</color>
|
||||
<color name="colorPrimaryDark">#004D40</color>
|
||||
<color name="colorAccent">#009688</color>
|
||||
</resources>
|
||||
|
|
@ -39,4 +39,11 @@
|
|||
<string name="msg_flash_complete">Firmware geflashed!\n\nOntkoppel de ESP en sluit opnieuw aan om de sleutel in te stellen.</string>
|
||||
<string name="button_close">Sluiten</string>
|
||||
<string name="button_cancel">Annuleren</string>
|
||||
|
||||
<!-- Theme -->
|
||||
<string name="section_theme">Weergave</string>
|
||||
<string name="theme_system">Systeem</string>
|
||||
<string name="theme_light">Licht</string>
|
||||
<string name="theme_dark">Donker</string>
|
||||
<string name="theme_applied">Thema: %s</string>
|
||||
</resources>
|
||||
|
|
|
|||
8
android/app/src/main/res/values/themes.xml
Normal file
8
android/app/src/main/res/values/themes.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="AppTheme" parent="Theme.AppCompat.DayNight">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
</resources>
|
||||
Loading…
Reference in a new issue