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_tweaks_cat">Tweaks</string>
<string name="pref_plugins">IITC Plugins</string> <string name="pref_plugins">IITC Plugins</string>
<string name="pref_plugins_title">Available 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">Display user location</string>
<string name="pref_user_loc_sum">Show users position on map</string> <string name="pref_user_loc_sum">Show users position on map</string>
<string name="pref_user_loc_sensor">Use sensor orientation</string> <string name="pref_user_loc_sensor">Use sensor orientation</string>

View File

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

View File

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