diff --git a/MyTracks/res/values/keys.xml b/MyTracks/res/values/keys.xml
index 14a13200c..631f15b66 100644
--- a/MyTracks/res/values/keys.xml
+++ b/MyTracks/res/values/keys.xml
@@ -15,6 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
+
allowAccess
antBikeCadenceSensorId
@@ -30,9 +31,9 @@ limitations under the License.
chartShowPower
chartShowSpeed
defaultActivity
- googleSettingsAccount
- googleSettingsDriveSync
- googleSettingsMapsPublic
+ defaultMapPublic
+ driveSync
+ googleAccount
maxRecordingDistance
metricUnits
minRecordingDistance
@@ -69,11 +70,11 @@ limitations under the License.
selectedTrackId
- googleSettings
settingsBackup
settingsBackupNow
settingsBackupRestore
settingsChart
+ settingsGoogle
settingsMap
settingsMapMediumDisplay
settingsMapPercentageDisplay
@@ -91,4 +92,5 @@ limitations under the License.
settingsSensorRoot
settingsSharing
settingsStats
+
\ No newline at end of file
diff --git a/MyTracks/res/values/strings.xml b/MyTracks/res/values/strings.xml
index 9c5b7cba7..7abf8dbaf 100644
--- a/MyTracks/res/values/strings.xml
+++ b/MyTracks/res/values/strings.xml
@@ -378,7 +378,7 @@ limitations under the License.
+ %1$s activity type. E.g., 'hiking'.">
Activity type: %1$s
+ %1$s time. E.g., '1:08:59'.">
Moving time: %1$s
+ %1$s time. E.g., '2/15/2012 1:40 PM'.">
Recorded: %1$s
+ %1$s time. E.g., '1:08:59'.">
Total time: %1$s
-
-
- Google
-
-
- Switch account
-
-
- Sync Google Drive
-
-
- All tracks will be synced to %1$s Google Drive
-
-
- New maps public
-
-
- New maps created in Google Maps will be unlisted, instead of public. See %1$s for more info.
-
-
- New maps created in Google Maps will be public, instead of unlisted. See %1$s for more info.
-
-
Import %1$s
@@ -1447,7 +1392,7 @@ limitations under the License.
translation_description="For a marker returned in the search result, the text field indicating
the track that the marker belongs to.
- %1$s: track name. E.g., 'Grand Canyon trail'">
+ %1$s: track name. E.g., 'Grand Canyon trail'.">
In track \'%1$s\'.
%1$s (Part %2$d)
@@ -1565,7 +1510,7 @@ limitations under the License.
+ sensor. E.g., 'Battery level: 50 %'.">
Battery level
+
+
+ Google
+
+
+ Switch account
+
+
+ All tracks will be synced to %1$s Google Drive
+
+
+ Sync Google Drive
+
+
+ New maps created in Google Maps will be unlisted, instead of public. See %1$s for more info.
+
+
+ New maps created in Google Maps will be public, instead of unlisted. See %1$s for more info.
+
+
+ New maps public
+
+
Top medium speed
-
-
Percentage from average
- Percentage from the average speed for the medium speed range.
+ translation_description="In the 'Map' settings, under the 'Dynamic thresholds' section, the
+ summary for the 'Percentage from average' option explaining that the medium speed range is set
+ as a percentage from the average speed.
+
+ %1$d: an integer value. E.g., '15'.">
+ The medium speed range is %1$d %% from the average speed
Top slow speed
Track color
-
-
Dynamic thresholds
+
+ Use dynamic thresholds to set slow, medium, and fast speed when coloring a track based on speed
+
Fixed thresholds
+
+ Use fixed thresholds to set slow, medium, and fast speed when coloring a track based on speed
+
Single color
-
- The way to color a track based on slow, medium, and fast speed.
-
I think you might be interested in this track:\n\n%1$s\n\n%2$s
@@ -2449,7 +2453,7 @@ limitations under the License.
km
+ translation_description="Abbreviation for kilometers per hour. E.g., '5 km/h'.">
km/h
+ translation_description="Abbreviation for miles per hour. E.g., '5 mi/h'.">
mi/h
+ translation_description="Abbreviation for minutes per kilometer. E.g., '5 min/km'.">
min/km
+ translation_description="Abbreviation for minutes per mile. E.g., '5 min/mi'.">
min/mi
@@ -2488,160 +2492,160 @@ limitations under the License.
+ %1$s: a string value of the coordinate. E.g., '2.2'.">
%1$s \u00B0
+ %1$.2f: a float number. E.g., '2.22'.">
%1$.2f ft
+ %1$.2f: a float number. E.g., '2.22'.">
%1$.2f km
+ %1$.2f: a float number. E.g., '2.22'.">
%1$.2f km/h
+ %1$.2f: a float number. E.g., '2.22'.">
%1$.2f m
+ %1$.2f: a float number. E.g., '2.22'.">
%1$.2f mi
+ %1$.2f: a float number. E.g., '2.22'.">
%1$.2f mi/h
+ %1$.1f: a float number. E.g., '2.2'.">
%1$.1f mi (poor GPS)
+ %1$.2f: a float number. E.g., '2.22'.">
%1$.2f min/km
+ %1$.2f: a float number. E.g., '2.22'.">
%1$.2f min/mi
+ %1$d: an integer value. E.g., '2'.">
%1$d ft
+ %1$d: an integer value. E.g., '2'.">
%1$d ft (excellent GPS)
+ %1$d: an integer value. E.g., '2'.">
%1$d ft (recommended)
+ %1$d: an integer value. E.g., '2'.">
%1$d km
+ %1$d: an integer value. E.g., '2'.">
%1$d km/h
+ %1$d: an integer value. E.g., '2'.">
%1$d m
+ %1$d: an integer value. E.g., '2'.">
%1$d m (excellent GPS)
+ %1$d: an integer value. E.g., '2'.">
%1$d m (poor GPS)
+ %1$d: an integer value. E.g., '2'.">
%1$d m (recommended)
+ %1$d: an integer value. E.g., '2'.">
%1$d mi
+ %1$d: an integer value. E.g., '2'.">
%1$d mi/h
+ %1$d: an integer value. E.g., '2'.">
%1$d min
+ %1$d: an integer value. E.g., '2'.">
%1$d %%
+ %1$d: an integer value. E.g., '2'.">
%1$d s
+ %1$s: distance string. E.g., '2.2 kilometers'.
+ %2$s: time string. E.g., '20 minutes 1 second'.
+ %3$s: speed/pace string. E.g., '2.2 miles per hour' for speed and
+ '30 minutes 1 second per kilometer' for pace.">
My Tracks %1$s in %2$s at %3$s.
+ android:title="@string/settings_google" >
+ android:key="@string/google_account_key"
+ android:title="@string/settings_google_account_title" />
+ android:key="@string/drive_sync_key"
+ android:title="@string/settings_google_drive_sync_title" />
+ android:key="@string/default_map_public_key"
+ android:title="@string/settings_google_maps_public_title" />
\ No newline at end of file
diff --git a/MyTracks/res/xml/settings.xml b/MyTracks/res/xml/settings.xml
index 8314cdd71..fdaf0ae82 100644
--- a/MyTracks/res/xml/settings.xml
+++ b/MyTracks/res/xml/settings.xml
@@ -17,9 +17,9 @@ limitations under the License.
+ android:title="@string/settings_google" />
entries = new ArrayList();
List entryValues = new ArrayList();
Account[] accounts = AccountManager.get(this).getAccountsByType(Constants.ACCOUNT_TYPE);
@@ -57,11 +57,11 @@ public class GoogleSettingsActivity extends AbstractSettingsActivity {
entryValues.add(account.name);
}
entries.add(getString(R.string.value_none));
- entryValues.add(PreferencesUtils.GOOGLE_SETTINGS_ACCOUNT_DEFAULT);
+ entryValues.add(PreferencesUtils.GOOGLE_ACCOUNT_DEFAULT);
- googleSettingsAccount.setEntries(entries.toArray(new CharSequence[entries.size()]));
- googleSettingsAccount.setEntryValues(entryValues.toArray(new CharSequence[entries.size()]));
- googleSettingsAccount.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
+ googleAccount.setEntries(entries.toArray(new CharSequence[entries.size()]));
+ googleAccount.setEntryValues(entryValues.toArray(new CharSequence[entries.size()]));
+ googleAccount.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
updateUi((String) newValue, true);
@@ -69,19 +69,19 @@ public class GoogleSettingsActivity extends AbstractSettingsActivity {
}
});
- settingsGoogleDriveSync = (CheckBoxPreference) findPreference(
- getString(R.string.google_settings_drive_sync_key));
+ driveSync = (CheckBoxPreference) findPreference(
+ getString(R.string.drive_sync_key));
CheckBoxPreference settingsGoogleMapsPublic = (CheckBoxPreference) findPreference(
- getString(R.string.google_settings_maps_public_key));
- settingsGoogleMapsPublic.setSummaryOn(getString(R.string.google_settings_maps_public_summary_on,
+ getString(R.string.default_map_public_key));
+ settingsGoogleMapsPublic.setSummaryOn(getString(R.string.settings_google_maps_public_summary_on,
getString(R.string.maps_public_unlisted_url)));
settingsGoogleMapsPublic.setSummaryOff(getString(
- R.string.google_settings_maps_public_summary_off,
+ R.string.settings_google_maps_public_summary_off,
getString(R.string.maps_public_unlisted_url)));
- String account = PreferencesUtils.getString(this, R.string.google_settings_account_key,
- PreferencesUtils.GOOGLE_SETTINGS_ACCOUNT_DEFAULT);
+ String account = PreferencesUtils.getString(this, R.string.google_account_key,
+ PreferencesUtils.GOOGLE_ACCOUNT_DEFAULT);
updateUi(account, false);
}
@@ -92,15 +92,15 @@ public class GoogleSettingsActivity extends AbstractSettingsActivity {
* @param uncheckDriveSync true to uncheck drive sync
*/
private void updateUi(String account, boolean uncheckDriveSync) {
- googleSettingsAccount.setSummary(PreferencesUtils.GOOGLE_SETTINGS_ACCOUNT_DEFAULT.equals(
+ googleAccount.setSummary(PreferencesUtils.GOOGLE_ACCOUNT_DEFAULT.equals(
account) ? getString(R.string.value_unknown)
: account);
- boolean hasAccount = !PreferencesUtils.GOOGLE_SETTINGS_ACCOUNT_DEFAULT.equals(account);
- settingsGoogleDriveSync.setEnabled(hasAccount);
- settingsGoogleDriveSync.setSummaryOn(
- getString(R.string.google_settings_drive_sync_summary_on, account));
+ boolean hasAccount = !PreferencesUtils.GOOGLE_ACCOUNT_DEFAULT.equals(account);
+ driveSync.setEnabled(hasAccount);
+ driveSync.setSummaryOn(
+ getString(R.string.settings_google_drive_sync_summary_on, account));
if (uncheckDriveSync) {
- settingsGoogleDriveSync.setChecked(false);
+ driveSync.setChecked(false);
}
}
}
diff --git a/MyTracks/src/com/google/android/apps/mytracks/settings/MapSettingsActivity.java b/MyTracks/src/com/google/android/apps/mytracks/settings/MapSettingsActivity.java
index a53556f4a..5e909d24a 100644
--- a/MyTracks/src/com/google/android/apps/mytracks/settings/MapSettingsActivity.java
+++ b/MyTracks/src/com/google/android/apps/mytracks/settings/MapSettingsActivity.java
@@ -41,9 +41,10 @@ public class MapSettingsActivity extends AbstractSettingsActivity {
private static final String TAG = MapSettingsActivity.class.getSimpleName();
- private EditTextPreference slowEditTextPreference;
- private EditTextPreference mediumEditTextPreference;
- private EditTextPreference percentageEditTextPreference;
+ private ListPreference trackColorModePreference;
+ private EditTextPreference slowPreference;
+ private EditTextPreference mediumPreference;
+ private EditTextPreference percentagePreference;
@SuppressWarnings("deprecation")
@Override
@@ -51,15 +52,33 @@ public class MapSettingsActivity extends AbstractSettingsActivity {
super.onCreate(bundle);
addPreferencesFromResource(R.xml.map_settings);
- slowEditTextPreference = (EditTextPreference) findPreference(
- getString(R.string.settings_map_slow_display_key));
- mediumEditTextPreference = (EditTextPreference) findPreference(
- getString(R.string.settings_map_medium_display_key));
- percentageEditTextPreference = (EditTextPreference) findPreference(
- getString(R.string.settings_map_percentage_display_key));
-
- ListPreference trackColorModeListPreference = (ListPreference) findPreference(
+ trackColorModePreference = (ListPreference) findPreference(
getString(R.string.track_color_mode_key));
+ slowPreference = (EditTextPreference) findPreference(
+ getString(R.string.settings_map_slow_display_key));
+ mediumPreference = (EditTextPreference) findPreference(
+ getString(R.string.settings_map_medium_display_key));
+ percentagePreference = (EditTextPreference) findPreference(
+ getString(R.string.settings_map_percentage_display_key));
+
+ configTrackColorModePerference();
+ configSpeedPreference(slowPreference, R.string.track_color_mode_slow_key,
+ PreferencesUtils.TRACK_COLOR_MODE_SLOW_DEFAULT);
+ configSpeedPreference(mediumPreference, R.string.track_color_mode_medium_key,
+ PreferencesUtils.TRACK_COLOR_MODE_MEDIUM_DEFAULT);
+ configPercentagePreference();
+
+ updateSpeedSummary(slowPreference, R.string.track_color_mode_slow_key,
+ PreferencesUtils.TRACK_COLOR_MODE_SLOW_DEFAULT);
+ updateSpeedSummary(mediumPreference, R.string.track_color_mode_medium_key,
+ PreferencesUtils.TRACK_COLOR_MODE_MEDIUM_DEFAULT);
+ updatePercentageSummary();
+ }
+
+ /**
+ * Configures the track color mode preference.
+ */
+ private void configTrackColorModePerference() {
OnPreferenceChangeListener listener = new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
@@ -67,52 +86,61 @@ public class MapSettingsActivity extends AbstractSettingsActivity {
return true;
}
};
- String trackColorModeValue = PreferencesUtils.getString(
+ String trackColorMode = PreferencesUtils.getString(
this, R.string.track_color_mode_key, PreferencesUtils.TRACK_COLOR_MODE_DEFAULT);
- configurePreference(trackColorModeListPreference,
+ configurePreference(trackColorModePreference,
getResources().getStringArray(R.array.track_color_mode_options),
- getResources().getStringArray(R.array.track_color_mode_values),
- R.string.settings_map_track_color_mode_summary, trackColorModeValue, listener);
-
- configureSpeedEditTextPreference(R.string.track_color_mode_slow_key);
- configureSpeedEditTextPreference(R.string.track_color_mode_medium_key);
- configurePercentageEditTextPreference();
-
- updatePercentageSummary();
+ getResources().getStringArray(R.array.track_color_mode_values), trackColorMode, listener);
}
/**
- * Configures the speed edit text preference.
+ * Configures the speed preference.
*
- * @param keyId the key id
+ * @param preference the preference
+ * @param key the key
+ * @param defaultValue the default value
*/
- private void configureSpeedEditTextPreference(final int keyId) {
- final EditTextPreference editTextPreference = keyId == R.string.track_color_mode_slow_key ? slowEditTextPreference
- : mediumEditTextPreference;
- editTextPreference.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
+ private void configSpeedPreference(
+ EditTextPreference preference, final int key, final int defaultValue) {
+ preference.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- storeSpeedValue(keyId, (String) newValue);
- updateSpeedSummary(keyId);
+ public boolean onPreferenceChange(Preference pref, Object newValue) {
+
+ // Need to obtain the current min and max values
+ int minValue;
+ int maxValue;
+ if (key == R.string.track_color_mode_slow_key) {
+ minValue = 0;
+ maxValue = PreferencesUtils.getInt(
+ MapSettingsActivity.this, R.string.track_color_mode_medium_key,
+ PreferencesUtils.TRACK_COLOR_MODE_MEDIUM_DEFAULT);
+ } else {
+ minValue = PreferencesUtils.getInt(
+ MapSettingsActivity.this, R.string.track_color_mode_slow_key,
+ PreferencesUtils.TRACK_COLOR_MODE_SLOW_DEFAULT);
+ maxValue = Integer.MAX_VALUE;
+ }
+ storeSpeedValue(key, minValue, maxValue, defaultValue, (String) newValue);
+ updateSpeedSummary(pref, key, defaultValue);
return true;
}
});
- editTextPreference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
+ preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
- public boolean onPreferenceClick(Preference preference) {
- int value = getSpeedDisplayValue(keyId);
- ((EditTextPreference) preference).getEditText().setText(String.valueOf(value));
+ public boolean onPreferenceClick(Preference pref) {
+ int value = getSpeedDisplayValue(key, defaultValue);
+ ((EditTextPreference) pref).getEditText().setText(String.valueOf(value));
return true;
}
});
- configureImeActionDone(editTextPreference);
+ configImeActionDone(preference);
}
/**
- * Configures the percentage edit text preference.
+ * Configures the percentage preference.
*/
- private void configurePercentageEditTextPreference() {
- percentageEditTextPreference.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
+ private void configPercentagePreference() {
+ percentagePreference.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
String displayValue = (String) newValue;
@@ -132,7 +160,7 @@ public class MapSettingsActivity extends AbstractSettingsActivity {
return true;
}
});
- percentageEditTextPreference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
+ percentagePreference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
int value = PreferencesUtils.getInt(
@@ -142,7 +170,7 @@ public class MapSettingsActivity extends AbstractSettingsActivity {
return true;
}
});
- configureImeActionDone(percentageEditTextPreference);
+ configImeActionDone(percentagePreference);
}
/**
@@ -150,7 +178,7 @@ public class MapSettingsActivity extends AbstractSettingsActivity {
*
* @param editTextPreference the edit text preference
*/
- private void configureImeActionDone(final EditTextPreference editTextPreference) {
+ private void configImeActionDone(final EditTextPreference editTextPreference) {
editTextPreference.getEditText()
.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
@@ -166,13 +194,6 @@ public class MapSettingsActivity extends AbstractSettingsActivity {
});
}
- @Override
- protected void onResume() {
- super.onResume();
- updateSpeedSummary(R.string.track_color_mode_slow_key);
- updateSpeedSummary(R.string.track_color_mode_medium_key);
- }
-
/**
* Updates the UI by the track color mode.
*
@@ -183,32 +204,54 @@ public class MapSettingsActivity extends AbstractSettingsActivity {
getString(R.string.settings_map_track_color_mode_fixed_value));
boolean isDynamicValue = trackColorMode.equals(
getString(R.string.settings_map_track_color_mode_dynamic_value));
- slowEditTextPreference.setEnabled(isFixedValue);
- mediumEditTextPreference.setEnabled(isFixedValue);
- percentageEditTextPreference.setEnabled(isDynamicValue);
+ if (isDynamicValue) {
+ trackColorModePreference.setSummary(R.string.settings_map_track_color_mode_dynamic_summary);
+ } else if (isFixedValue) {
+ trackColorModePreference.setSummary(R.string.settings_map_track_color_mode_fixed_summary);
+ } else {
+ trackColorModePreference.setSummary(R.string.settings_map_track_color_mode_single);
+ }
+ slowPreference.setEnabled(isFixedValue);
+ mediumPreference.setEnabled(isFixedValue);
+ percentagePreference.setEnabled(isDynamicValue);
}
/**
- * Stores the speed value, always in metric units.
+ * Updates a speed summary.
+ *
+ * @param preference the preference
+ * @param keyId the key id
+ * @param defaultValue the default value
+ */
+ private void updateSpeedSummary(Preference preference, int keyId, int defaultValue) {
+ boolean metric = PreferencesUtils.getBoolean(
+ this, R.string.metric_units_key, PreferencesUtils.METRIC_UNITS_DEFAULT);
+ int displayValue = getSpeedDisplayValue(keyId, defaultValue);
+ preference.setSummary(getString(
+ metric ? R.string.value_integer_kilometer_hour : R.string.value_integer_mile_hour,
+ displayValue));
+ }
+
+ /**
+ * Updates the percentage summary.
+ */
+ private void updatePercentageSummary() {
+ int value = PreferencesUtils.getInt(this, R.string.track_color_mode_percentage_key,
+ PreferencesUtils.TRACK_COLOR_MODE_PERCENTAGE_DEFAULT);
+ percentagePreference.setSummary(getString(R.string.settings_map_percentage_summary, value));
+ }
+
+ /**
+ * Stores a speed value, always in metric units.
*
* @param keyId the key id
+ * @param minValue the min value
+ * @param maxValue the max value
+ * @param defaultValue the default value
* @param displayValue the display value
*/
- private void storeSpeedValue(int keyId, String displayValue) {
- int maxValue;
- int minValue;
- int defaultValue;
- if (keyId == R.string.track_color_mode_slow_key) {
- minValue = 0;
- maxValue = PreferencesUtils.getInt(this, R.string.track_color_mode_medium_key,
- PreferencesUtils.TRACK_COLOR_MODE_MEDIUM_DEFAULT);
- defaultValue = PreferencesUtils.TRACK_COLOR_MODE_SLOW_DEFAULT;
- } else {
- minValue = PreferencesUtils.getInt(
- this, R.string.track_color_mode_slow_key, PreferencesUtils.TRACK_COLOR_MODE_SLOW_DEFAULT);
- maxValue = Integer.MAX_VALUE;
- defaultValue = PreferencesUtils.TRACK_COLOR_MODE_MEDIUM_DEFAULT;
- }
+ private void storeSpeedValue(
+ int keyId, int minValue, int maxValue, int defaultValue, String displayValue) {
int value;
try {
value = Integer.parseInt(displayValue);
@@ -231,14 +274,13 @@ public class MapSettingsActivity extends AbstractSettingsActivity {
}
/**
- * Gets the speed display value, in metric or imperial depending on the
- * preferred units.
+ * Gets a speed display value in metric or imperial depending on the preferred
+ * units.
*
* @param keyId the key id
+ * @param defaultValue the default value
*/
- private int getSpeedDisplayValue(int keyId) {
- int defaultValue = keyId == R.string.track_color_mode_slow_key ? PreferencesUtils.TRACK_COLOR_MODE_SLOW_DEFAULT
- : PreferencesUtils.TRACK_COLOR_MODE_MEDIUM_DEFAULT;
+ private int getSpeedDisplayValue(int keyId, int defaultValue) {
int value = PreferencesUtils.getInt(this, keyId, defaultValue);
if (!PreferencesUtils.getBoolean(
this, R.string.metric_units_key, PreferencesUtils.METRIC_UNITS_DEFAULT)) {
@@ -246,31 +288,4 @@ public class MapSettingsActivity extends AbstractSettingsActivity {
}
return value;
}
-
- /**
- * Updates the speed summary.
- *
- * @param keyId the key id
- */
- private void updateSpeedSummary(int keyId) {
- EditTextPreference editTextPreference = keyId == R.string.track_color_mode_slow_key ? slowEditTextPreference
- : mediumEditTextPreference;
- boolean metric = PreferencesUtils.getBoolean(
- this, R.string.metric_units_key, PreferencesUtils.METRIC_UNITS_DEFAULT);
- int displayValue = getSpeedDisplayValue(keyId);
- editTextPreference.setSummary(getString(
- metric ? R.string.value_integer_kilometer_hour : R.string.value_integer_mile_hour,
- displayValue));
- }
-
- /**
- * Updates the percentage summary.
- */
- private void updatePercentageSummary() {
- int value = PreferencesUtils.getInt(MapSettingsActivity.this,
- R.string.track_color_mode_percentage_key,
- PreferencesUtils.TRACK_COLOR_MODE_PERCENTAGE_DEFAULT);
- percentageEditTextPreference.setSummary(getString(R.string.settings_map_percentage_summary)
- + "\n" + getString(R.string.value_integer_percent, value));
- }
}
diff --git a/MyTracks/src/com/google/android/apps/mytracks/settings/SettingsActivity.java b/MyTracks/src/com/google/android/apps/mytracks/settings/SettingsActivity.java
index 6f8c68b0d..36032cd0d 100644
--- a/MyTracks/src/com/google/android/apps/mytracks/settings/SettingsActivity.java
+++ b/MyTracks/src/com/google/android/apps/mytracks/settings/SettingsActivity.java
@@ -52,7 +52,7 @@ public class SettingsActivity extends AbstractSettingsActivity {
super.onCreate(bundle);
addPreferencesFromResource(R.xml.settings);
- configPreference(R.string.google_settings_key, GoogleSettingsActivity.class);
+ configPreference(R.string.settings_google_key, GoogleSettingsActivity.class);
configPreference(R.string.settings_map_key, MapSettingsActivity.class);
configPreference(R.string.settings_chart_key, ChartSettingsActivity.class);
configPreference(R.string.settings_stats_key, StatsSettingsActivity.class);
diff --git a/MyTracks/src/com/google/android/apps/mytracks/util/PreferencesUtils.java b/MyTracks/src/com/google/android/apps/mytracks/util/PreferencesUtils.java
index d9367f44a..1ab85b92f 100644
--- a/MyTracks/src/com/google/android/apps/mytracks/util/PreferencesUtils.java
+++ b/MyTracks/src/com/google/android/apps/mytracks/util/PreferencesUtils.java
@@ -36,35 +36,36 @@ public class PreferencesUtils {
public static final boolean ALLOW_ACCESS_DEFAULT = false;
public static final int AUTO_RESUME_TRACK_CURRENT_RETRY_DEFAULT = 0;
+ // Values for auto_resume_track_timeout_key
public static final int AUTO_RESUME_TRACK_TIMEOUT_ALWAYS = -1;
public static final int AUTO_RESUME_TRACK_TIMEOUT_DEFAULT = 10;
public static final int AUTO_RESUME_TRACK_TIMEOUT_NEVER = 0;
public static final String BLUETOOTH_SENSOR_DEFAULT = "";
-
public static final boolean CHART_BY_DISTANCE_DEFAULT = true;
public static final boolean CHART_SHOW_CADENCE_DEFAULT = true;
public static final boolean CHART_SHOW_ELEVATION_DEFAULT = true;
public static final boolean CHART_SHOW_HEART_RATE_DEFAULT = true;
public static final boolean CHART_SHOW_POWER_DEFAULT = true;
public static final boolean CHART_SHOW_SPEED_DEFAULT = true;
-
public static final String DEFAULT_ACTIVITY_DEFAULT = "";
-
+ public static final boolean DEFAULT_MAP_PUBLIC_DEFAULT = false;
+ public static final boolean DRIVE_SYNC_DEFAULT = false;
+
+ // Value for split_frequency_key and voice_frequency_key
public static final int FREQUENCY_OFF = 0;
- public static final String GOOGLE_SETTINGS_ACCOUNT_DEFAULT = "";
- public static final boolean GOOGLE_SETTINGS_DRIVE_SYNC_DEFAULT = false;
- public static final boolean GOOGLE_SETTINGS_MAPS_PUBLIC_DEFAULT = false;
-
+ public static final String GOOGLE_ACCOUNT_DEFAULT = "";
public static final int MAX_RECORDING_DISTANCE_DEFAULT = 200;
public static final boolean METRIC_UNITS_DEFAULT = true;
public static final int MIN_RECORDING_DISTANCE_DEFAULT = 5;
+ // Values for min_recording_interval_key
public static final int MIN_RECORDING_INTERVAL_ADAPT_ACCURACY = -1;
public static final int MIN_RECORDING_INTERVAL_ADAPT_BATTERY_LIFE = -2;
public static final int MIN_RECORDING_INTERVAL_DEFAULT = 0;
+ // Values for min_required_accuracy
public static final int MIN_REQUIRED_ACCURACY_DEFAULT = 200;
public static final int MIN_REQUIRED_ACCURACY_EXCELLENT = 10;
public static final int MIN_REQUIRED_ACCURACY_POOR = 5000;
@@ -77,30 +78,23 @@ public class PreferencesUtils {
public static final boolean SEND_TO_DOCS_DEFAULT = true;
public static final boolean SEND_TO_FUSION_TABLES_DEFAULT = true;
public static final boolean SEND_TO_MAPS_DEFAULT = true;
-
- public static final String SENSOR_TYPE_DEFAULT = "NONE";
-
+ public static final String SENSOR_TYPE_DEFAULT = "NONE";
public static final boolean SHOW_CONFIRM_PLAY_DIALOG_DEFAULT = true;
public static final boolean SHOW_CONFIRM_SHARING_DIALOG_DEFAULT = true;
public static final int SPLIT_FREQUENCY_DEFAULT = 0;
-
public static final boolean STATS_SHOW_COORDINATE_DEFAULT = false;
public static final boolean STATS_SHOW_ELEVATION_DEFAULT = false;
public static final boolean STATS_SHOW_GRADE_DEFAULT = false;
public static final boolean STATS_SHOW_MOVING_TIME_DEFAULT = false;
-
public static final String TRACK_COLOR_MODE_DEFAULT = "SINGLE";
public static final int TRACK_COLOR_MODE_MEDIUM_DEFAULT = 15;
public static final int TRACK_COLOR_MODE_PERCENTAGE_DEFAULT = 25;
public static final int TRACK_COLOR_MODE_SLOW_DEFAULT = 9;
-
public static final String TRACK_NAME_DEFAULT = "LOCATION";
-
public static final int TRACK_WIDGET_ITEM1_DEFAULT = 3; // moving time
public static final int TRACK_WIDGET_ITEM2_DEFAULT = 0; // distance
public static final int TRACK_WIDGET_ITEM3_DEFAULT = 1; // total time
public static final int TRACK_WIDGET_ITEM4_DEFAULT = 2; // average speed
-
public static final int VOICE_FREQUENCY_DEFAULT = 0;
private PreferencesUtils() {}