Skip to content

Commit

Permalink
Merge pull request #1448 from matkoniecz/settings_reorg
Browse files Browse the repository at this point in the history
rework settings layout
  • Loading branch information
westnordost authored Jun 29, 2019
2 parents 41d2bad + dcc69dd commit 27334ca
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 38 deletions.
2 changes: 0 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@
<string name="quest_sport_ice_hockey">"Ice hockey"</string>
<string name="quest_sport_netball">"Netball"</string>
<string name="quest_sport_rugby">"Rugby"</string>
<string name="pref_category_cache">"Cache"</string>
<string name="pref_title_sync">"Auto-sync"</string>
<string name="map_btn_zoom_out">"Zoom out"</string>
<string name="map_btn_zoom_in">"Zoom in"</string>
Expand Down Expand Up @@ -643,7 +642,6 @@ Otherwise, you can download another keyboard in the app store. Popular keyboards
<string name="quest_sidewalk_value_yes">sidewalk</string>
<string name="quest_sidewalk_value_no">no sidewalk</string>
<string name="quest_accessible_for_pedestrians_title_prohibited">Are pedestrians prohibited from walking on this road here?</string>
<string name="pref_category_theme">Theme</string>
<string name="pref_title_theme_select">Select theme</string>
<string name="theme_automatic">Auto</string>
<string name="theme_light">Light</string>
Expand Down
59 changes: 23 additions & 36 deletions app/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,14 @@

</PreferenceCategory>

<PreferenceCategory
android:title="@string/pref_category_cache">

<de.westnordost.streetcomplete.settings.NumberPickerPreference
android:key="map.tilecache"
android:title="@string/pref_title_map_cache"
android:summary="@string/pref_tilecache_size_summary"
android:defaultValue="150"
android:persistent="true"
custom:minValue="50"
custom:maxValue="500"
custom:step="25"
android:dialogMessage="@string/pref_tilecache_size_message"
android:dialogLayout="@layout/dialog_number_picker_preference"
android:positiveButtonText="@android:string/ok"
android:negativeButtonText="@android:string/cancel"
/>

</PreferenceCategory>

<PreferenceCategory
android:key="display"
android:title="@string/pref_category_display">

<SwitchPreference
android:key="display.keepScreenOn"
android:title="@string/pref_title_keep_screen_on"
android:persistent="true"
<Preference
android:key="quests"
android:title="@string/pref_title_quests"
android:widgetLayout="@layout/widget_image_next"
/>

<SwitchPreference
Expand All @@ -64,11 +44,11 @@
android:persistent="true"
/>

</PreferenceCategory>

<PreferenceCategory
android:key="theme"
android:title="@string/pref_category_theme">
<SwitchPreference
android:key="display.keepScreenOn"
android:title="@string/pref_title_keep_screen_on"
android:persistent="true"
/>

<ListPreference
android:key="theme.select"
Expand All @@ -79,20 +59,13 @@
android:entryValues="@array/pref_entryvalues_theme_select"
android:persistent="true"
/>

</PreferenceCategory>

<PreferenceCategory
android:key="advanced"
android:title="@string/pref_category_advanced"
>

<Preference
android:key="quests"
android:title="@string/pref_title_quests"
android:widgetLayout="@layout/widget_image_next"
/>

<Preference
android:key="quests.invalidation"
android:title="@string/pref_title_quests_invalidation"
Expand All @@ -104,6 +77,20 @@
android:title="@string/pref_title_quests_restore_hidden"
/>

<de.westnordost.streetcomplete.settings.NumberPickerPreference
android:key="map.tilecache"
android:title="@string/pref_title_map_cache"
android:summary="@string/pref_tilecache_size_summary"
android:defaultValue="150"
android:persistent="true"
custom:minValue="50"
custom:maxValue="500"
custom:step="25"
android:dialogMessage="@string/pref_tilecache_size_message"
android:dialogLayout="@layout/dialog_number_picker_preference"
android:positiveButtonText="@android:string/ok"
android:negativeButtonText="@android:string/cancel"
/>
</PreferenceCategory>

</PreferenceScreen>

0 comments on commit 27334ca

Please sign in to comment.