diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-04-17 21:29:00 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-04-17 21:29:00 +0300 |
commit | 9ce1517b6f5a031ff93137f12fee18515c126eab (patch) | |
tree | 05e748a9df66d53361a14776c3c3de0ec1040d21 /app/src/main/res | |
parent | bfb2e2f60d7362c7e7e4cedb0889292aa48331a4 (diff) |
#317 Adjust theme for each account
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/ic_format_paint_grey600_24dp.xml | 5 | ||||
-rw-r--r-- | app/src/main/res/values/customization.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/values/setup.xml | 1 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 3 | ||||
-rw-r--r-- | app/src/main/res/xml/settings.xml | 47 |
5 files changed, 37 insertions, 21 deletions
diff --git a/app/src/main/res/drawable/ic_format_paint_grey600_24dp.xml b/app/src/main/res/drawable/ic_format_paint_grey600_24dp.xml new file mode 100644 index 000000000..a2308a55f --- /dev/null +++ b/app/src/main/res/drawable/ic_format_paint_grey600_24dp.xml @@ -0,0 +1,5 @@ +<vector android:autoMirrored="true" android:height="24dp" + android:tint="#757575" android:viewportHeight="24.0" + android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="#FF000000" android:pathData="M18,4V3c0,-0.55 -0.45,-1 -1,-1H5c-0.55,0 -1,0.45 -1,1v4c0,0.55 0.45,1 1,1h12c0.55,0 1,-0.45 1,-1V6h1v4H9v11c0,0.55 0.45,1 1,1h2c0.55,0 1,-0.45 1,-1v-9h8V4h-3z"/> +</vector> diff --git a/app/src/main/res/values/customization.xml b/app/src/main/res/values/customization.xml index 6e7e42a47..cb39e381a 100644 --- a/app/src/main/res/values/customization.xml +++ b/app/src/main/res/values/customization.xml @@ -1,7 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <!-- Apply the brand of the instance for each account to UI elements --> - <bool name="enable_brand">false</bool> <!-- How many avatars should be displayed in the card list view --> <integer name="max_avatar_count">3</integer> <!-- How many users should be suggested when clicking on the assigned users input field --> diff --git a/app/src/main/res/values/setup.xml b/app/src/main/res/values/setup.xml index a51735dc5..fb917ffb7 100644 --- a/app/src/main/res/values/setup.xml +++ b/app/src/main/res/values/setup.xml @@ -8,6 +8,7 @@ <string name="pref_key_wifi_only" translatable="false">wifiOnly</string> <string name="pref_key_dark_theme" translatable="false">darkTheme</string> + <string name="pref_key_branding" translatable="false">branding</string> <string name="pref_key_background_sync" translatable="false">backgroundSync</string> <string name="pref_value_background_sync_off">off</string> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8349d91f7..7f8bbaf99 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -88,6 +88,8 @@ <string name="error">An error appeared</string> <string name="operation_not_yet_supported">Not yet supported</string> <string name="simple_copy">copy</string> + <string name="simple_synchronization">Synchronization</string> + <string name="simple_appearance">Appearance</string> <string name="simple_error">Error</string> <string name="simple_exception">Exception</string> <string name="copied_to_clipboard">Copied to clipboard</string> @@ -129,6 +131,7 @@ <string name="simple_rename">Rename</string> <string name="simple_settings">Settings</string> <string name="settings_theme_title">Dark theme</string> + <string name="settings_branding_title">Branding</string> <string name="settings_background_sync">Background synchronization</string> <string name="pref_value_wifi_and_mobile">Sync on Wi-Fi and mobile data</string> <string name="pref_value_wifi_only">Sync only on Wi-Fi</string> diff --git a/app/src/main/res/xml/settings.xml b/app/src/main/res/xml/settings.xml index 69249ec38..0fe560a34 100644 --- a/app/src/main/res/xml/settings.xml +++ b/app/src/main/res/xml/settings.xml @@ -1,24 +1,33 @@ <?xml version="1.0" encoding="utf-8"?> -<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> +<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + <it.niedermann.nextcloud.deck.ui.branding.BrandedPreferenceCategory app:title="@string/simple_synchronization"> + <it.niedermann.nextcloud.deck.ui.branding.BrandedSwitchPreference + android:defaultValue="@string/pref_value_wifi_and_mobile" + android:icon="@drawable/ic_network_wifi_grey600_24dp" + android:key="@string/pref_key_wifi_only" + android:title="@string/pref_value_wifi_only" /> - <it.niedermann.nextcloud.deck.ui.branding.BrandedSwitchPreference - android:defaultValue="@string/pref_value_wifi_and_mobile" - android:icon="@drawable/ic_network_wifi_grey600_24dp" - android:key="@string/pref_key_wifi_only" - android:title="@string/pref_value_wifi_only" /> + <ListPreference + android:defaultValue="@string/minutes_15" + android:entries="@array/background_sync_entries" + android:entryValues="@array/background_sync_values" + android:icon="@drawable/ic_sync_grey600_24dp" + android:key="@string/pref_key_background_sync" + android:summary="%s" + android:title="@string/settings_background_sync" /> + </it.niedermann.nextcloud.deck.ui.branding.BrandedPreferenceCategory> - <ListPreference - android:defaultValue="@string/minutes_15" - android:entries="@array/background_sync_entries" - android:entryValues="@array/background_sync_values" - android:icon="@drawable/ic_sync_grey600_24dp" - android:key="@string/pref_key_background_sync" - android:summary="%s" - android:title="@string/settings_background_sync" /> + <it.niedermann.nextcloud.deck.ui.branding.BrandedPreferenceCategory android:title="@string/simple_appearance"> + <it.niedermann.nextcloud.deck.ui.branding.BrandedSwitchPreference + android:defaultValue="@string/pref_value_theme_light" + android:icon="@drawable/ic_brightness_2_grey600_24dp" + android:key="@string/pref_key_dark_theme" + android:title="@string/settings_theme_title" /> - <it.niedermann.nextcloud.deck.ui.branding.BrandedSwitchPreference - android:defaultValue="@string/pref_value_theme_light" - android:icon="@drawable/ic_brightness_2_grey600_24dp" - android:key="@string/pref_key_dark_theme" - android:title="@string/settings_theme_title" /> + <it.niedermann.nextcloud.deck.ui.branding.BrandedSwitchPreference + android:icon="@drawable/ic_format_paint_grey600_24dp" + android:key="@string/pref_key_branding" + android:title="@string/settings_branding_title" /> + </it.niedermann.nextcloud.deck.ui.branding.BrandedPreferenceCategory> </PreferenceScreen> |