diff options
author | stefan-niedermann <info@niedermann.it> | 2020-01-31 14:56:28 +0300 |
---|---|---|
committer | stefan-niedermann <info@niedermann.it> | 2020-01-31 14:56:28 +0300 |
commit | 3dfbf53d23f770d670cf55087f3a2d193f0ec3cb (patch) | |
tree | 23071af2aa2cb8df5842fba17ee570c14d66fcdc /app/src/main/res | |
parent | 0115cb3d8a699a77dc40e055380a10610d99bd26 (diff) | |
parent | 822e12103953f048edc873996347627ac92bf67f (diff) |
Merge branch 'sync-worker'
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/ic_network_wifi_grey600_24dp.xml | 6 | ||||
-rw-r--r-- | app/src/main/res/layout/item_notes_list_note_item.xml | 3 | ||||
-rw-r--r-- | app/src/main/res/values/arrays.xml | 6 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 16 | ||||
-rw-r--r-- | app/src/main/res/xml/preferences.xml | 12 |
5 files changed, 41 insertions, 2 deletions
diff --git a/app/src/main/res/drawable/ic_network_wifi_grey600_24dp.xml b/app/src/main/res/drawable/ic_network_wifi_grey600_24dp.xml new file mode 100644 index 00000000..1c3b9a41 --- /dev/null +++ b/app/src/main/res/drawable/ic_network_wifi_grey600_24dp.xml @@ -0,0 +1,6 @@ +<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:fillAlpha=".3" android:fillColor="#FF000000" android:pathData="M12.01,21.49L23.64,7c-0.45,-0.34 -4.93,-4 -11.64,-4C5.28,3 0.81,6.66 0.36,7l11.63,14.49 0.01,0.01 0.01,-0.01z"/> + <path android:fillColor="#FF000000" android:pathData="M3.53,10.95l8.46,10.54 0.01,0.01 0.01,-0.01 8.46,-10.54C20.04,10.62 16.81,8 12,8c-4.81,0 -8.04,2.62 -8.47,2.95z"/> +</vector> diff --git a/app/src/main/res/layout/item_notes_list_note_item.xml b/app/src/main/res/layout/item_notes_list_note_item.xml index 19ba07b4..2c6a0eed 100644 --- a/app/src/main/res/layout/item_notes_list_note_item.xml +++ b/app/src/main/res/layout/item_notes_list_note_item.xml @@ -79,7 +79,8 @@ android:id="@+id/noteTitle" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:singleLine="true" + android:ellipsize="end" + android:maxLines="1" android:layout_weight="1" android:textSize="@dimen/primary_font_size" android:textColor="?android:textColorPrimary" diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 1d4ed668..cc342086 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -10,4 +10,10 @@ <item>@string/pref_value_font_size_medium</item> <item>@string/pref_value_font_size_large</item> </string-array> + <string-array name="sync_values"> + <item>@string/pref_value_sync_off</item> + <item>@string/pref_value_sync_15_minutes</item> + <item>@string/pref_value_sync_1_hour</item> + <item>@string/pref_value_sync_6_hours</item> + </string-array> </resources>
\ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 78f63ec4..5ab97e3f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -43,6 +43,7 @@ <string name="settings_font_title">Monospace font</string> <string name="settings_font_size">Font size</string> <string name="settings_wifi_only">Sync only on Wi-Fi</string> + <string name="settings_background_sync">Background synchronization</string> <!-- Certificates --> @@ -112,15 +113,22 @@ <string name="pref_key_font_size" translatable="false">fontSize</string> <string name="pref_key_wifi_only" translatable="false">wifiOnly</string> <string name="pref_key_last_note_mode" translatable="false">lastNoteMode</string> + <string name="pref_key_background_sync" translatable="false">backgroundSync</string> <string name="pref_value_mode_edit" translatable="false">edit</string> <string name="pref_value_mode_preview" translatable="false">preview</string> <string name="pref_value_mode_last" translatable="false">last</string> <string name="pref_value_font_size_small" translatable="false">small</string> <string name="pref_value_font_size_medium" translatable="false">medium</string> <string name="pref_value_font_size_large" translatable="false">large</string> + <string name="pref_value_sync_off" translatable="false">off</string> + <string name="pref_value_sync_15_minutes" translatable="false">15_minutes</string> + <string name="pref_value_sync_1_hour" translatable="false">1_hour</string> + <string name="pref_value_sync_6_hours" translatable="false">6_hours</string> + <!-- These values should not be translateable. They should be migrated at some point. --> <string name="pref_value_theme_light">Light</string> <string name="pref_value_font_normal">Normal</string> <string name="pref_value_wifi_and_mobile">Sync on Wi-Fi and mobile data</string> + <string name="simple_error">Error</string> <string name="simple_close">Close</string> <string name="simple_copy">Copy</string> @@ -161,6 +169,14 @@ <item>Large</item> </string-array> + <!-- Array: background synchronization --> + <string-array name="sync_entries"> + <item>Off</item> + <item>15 minutes</item> + <item>1 hour</item> + <item>6 hours</item> + </string-array> + <!-- Plurals --> <plurals name="ab_selected"> <item quantity="one">%d selected</item> diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index d1668a87..b13422db 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -37,9 +37,19 @@ <SwitchPreference android:defaultValue="@string/pref_value_wifi_and_mobile" - android:icon="@drawable/ic_sync_black_24dp" + android:icon="@drawable/ic_network_wifi_grey600_24dp" android:key="@string/pref_key_wifi_only" android:layout="@layout/item_pref" android:title="@string/settings_wifi_only" /> + <ListPreference + android:defaultValue="@string/pref_value_sync_off" + android:entries="@array/sync_entries" + android:entryValues="@array/sync_values" + android:icon="@drawable/ic_sync_black_24dp" + android:key="@string/pref_key_background_sync" + android:layout="@layout/item_pref" + android:summary="%s" + android:title="@string/settings_background_sync" /> + </PreferenceScreen> |