moved user location to sub preference screen

This commit is contained in:
Philipp Schaefer 2013-12-19 16:47:01 +01:00
parent 2af53b4699
commit 7afbd6d957
3 changed files with 19 additions and 12 deletions

View File

@ -83,6 +83,7 @@
<string name="pref_tweaks_cat">Tweaks</string>
<string name="pref_plugins">IITC Plugins</string>
<string name="pref_plugins_title">Available plugins</string>
<string name="pref_user_loc_screen">User location</string>
<string name="pref_user_loc">Display user location</string>
<string name="pref_user_loc_sum">Show users position on map</string>
<string name="pref_user_loc_sensor">Use sensor orientation</string>

View File

@ -14,17 +14,22 @@
<PreferenceCategory
android:key="pref_ui_cat"
android:title="@string/pref_ui_cat">
<CheckBoxPreference
android:defaultValue="false"
android:key="pref_user_loc"
android:summary="@string/pref_user_loc_sum"
android:title="@string/pref_user_loc"/>
<CheckBoxPreference
android:defaultValue="true"
android:key="pref_user_loc_sensor"
android:dependency="pref_user_loc"
android:summary="@string/pref_user_loc_sensor_sum"
android:title="@string/pref_user_loc_sensor"/>
<PreferenceScreen
android:key="pref_user_loc_screen"
android:persistent="false"
android:title="@string/pref_user_loc_screen">
<CheckBoxPreference
android:defaultValue="false"
android:key="pref_user_loc"
android:summary="@string/pref_user_loc_sum"
android:title="@string/pref_user_loc"/>
<CheckBoxPreference
android:defaultValue="true"
android:key="pref_user_loc_sensor"
android:dependency="pref_user_loc"
android:summary="@string/pref_user_loc_sensor_sum"
android:title="@string/pref_user_loc_sensor"/>
</PreferenceScreen>
<CheckBoxPreference
android:defaultValue="false"
android:key="pref_user_zoom"

View File

@ -63,7 +63,8 @@ public class MainSettings extends PreferenceFragment {
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
if (preference.getTitle().toString().equals(getString(R.string.pref_advanced_options))
|| preference.getTitle().toString().equals(getString(R.string.pref_about_title))) {
|| preference.getTitle().toString().equals(getString(R.string.pref_about_title))
|| preference.getTitle().toString().equals(getString(R.string.pref_user_loc_screen))) {
initializeActionBar((PreferenceScreen) preference);
}
return super.onPreferenceTreeClick(preferenceScreen, preference);