forked from organicmaps/organicmaps
Improve routing options preferences
Signed-off-by: Jean-BaptisteC <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
parent
b9582b9067
commit
88f93f2ad0
3 changed files with 10 additions and 0 deletions
|
@ -21,6 +21,7 @@ import app.organicmaps.editor.ProfileActivity;
|
|||
import app.organicmaps.help.HelpActivity;
|
||||
import app.organicmaps.location.LocationHelper;
|
||||
import app.organicmaps.location.LocationProviderFactory;
|
||||
import app.organicmaps.routing.RoutingOptions;
|
||||
import app.organicmaps.util.Config;
|
||||
import app.organicmaps.util.NetworkPolicy;
|
||||
import app.organicmaps.util.PowerManagment;
|
||||
|
@ -70,12 +71,19 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment
|
|||
pref.setSummary(Config.TTS.isEnabled() ? R.string.on : R.string.off);
|
||||
}
|
||||
|
||||
private void updateRoutingSettingsPrefsSummary()
|
||||
{
|
||||
final Preference pref = getPreference(getString(R.string.prefs_routing));
|
||||
pref.setSummary(RoutingOptions.hasAnyOptions() ? R.string.on : R.string.off);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume()
|
||||
{
|
||||
super.onResume();
|
||||
|
||||
updateVoiceInstructionsPrefsSummary();
|
||||
updateRoutingSettingsPrefsSummary();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
<string name="pref_tts_speed_cameras" translatable="false">SpeedCameras</string>
|
||||
<!-- TODO: Move to another domain. -->
|
||||
<string name="tts_info_link" translatable="false">https://mapsme.zendesk.com/hc/en-us/articles/208628985-How-can-I-check-TTS-settings-on-my-Android-device-</string>
|
||||
<string name="prefs_routing" translatable="false">RoutingOptions</string>
|
||||
<string name="pref_autodownload" translatable="false">AutoDownloadMap</string>
|
||||
<string name="pref_3d" translatable="false">3D</string>
|
||||
<string name="pref_3d_buildings" translatable="false">3DBuildings</string>
|
||||
|
|
|
@ -128,6 +128,7 @@
|
|||
android:order="4">
|
||||
</Preference>
|
||||
<PreferenceScreen
|
||||
android:key="@string/prefs_routing"
|
||||
android:order="5"
|
||||
android:title="@string/driving_options_title">
|
||||
<intent
|
||||
|
|
Loading…
Add table
Reference in a new issue