Update wording for "New maps public" settings.

This commit is contained in:
Jimmy Shih
2012-07-02 14:23:13 -07:00
parent aab2f7b1c4
commit 095750d1e9
3 changed files with 21 additions and 48 deletions
+16 -22
View File
@@ -1957,37 +1957,31 @@ limitations under the License.
Tracks data.">
Other apps can read, write, start/stop recording My Tracks data.
</string>
<string name="settings_sharing_map_public"
translation_description="In the 'Sharing' settings, the title of the option to make new maps
created in Google Maps public, as opposed to unlisted. See
<string name="settings_sharing_new_map_public"
translation_description="In the 'Sharing' settings, the checkbox option to make new maps created
in Google Maps public, instead of unlisted. See
http://support.google.com/maps/bin/answer.py?answer=144365 for public versus unlisted.
Character limit: ~23 (1 line)">
Make new maps public
New maps public
</string>
<string name="settings_sharing_map_public_summary"
translation_description="In the 'Sharing' settings, the summary for the 'Make new maps public'
option explaining that new maps created in Google Maps will be public, as opposed to unlisted.
See http://support.google.com/maps/bin/answer.py?answer=144365 for public versus unlisted.
%1$s url. E.g., 'support.google.com/maps/bin/answer.py?answer=144365'.">
New maps created in Google Maps will be public. See %1$s for more info.
</string>
<string name="settings_sharing_map_unlisted"
translation_description="In the 'Sharing' settings, the title of the option to make new maps
created in Google Maps unlisted, as opposed to public. See
<string name="settings_sharing_new_map_public_summary_off"
translation_description="In the 'Sharing' settings, the summary for the 'New maps public'
checkbox option when it is unchecked explaining that new maps created in Google Maps will be
unlisted, instead of public. See
http://support.google.com/maps/bin/answer.py?answer=144365 for public versus unlisted.
Character limit: ~23 (1 line)">
Make new maps unlisted
%1$s url. E.g., 'support.google.com/maps/bin/answer.py?answer=144365'.">
New maps created in Google Maps will be unlisted, instead of public. See %1$s for more info.
</string>
<string name="settings_sharing_map_unlisted_summary"
translation_description="In the 'Sharing' settings, the summary for the 'Make new maps unlisted'
option explaining that new maps created in Google Maps will be unlisted, as opposed to public.
See http://support.google.com/maps/bin/answer.py?answer=144365 for public versus unlisted.
<string name="settings_sharing_new_map_public_summary_on"
translation_description="In the 'Sharing' settings, the summary for the 'New maps public'
checkbox option when it is checked explaining that new maps created in Google Maps will be
public, instead of unlisted. See
http://support.google.com/maps/bin/answer.py?answer=144365 for public versus unlisted.
%1$s url. E.g., 'support.google.com/maps/bin/answer.py?answer=144365'.">
New maps created in Google Maps will be unlisted. See %1$s for more info.
New maps created in Google Maps will be public, instead of unlisted. See %1$s for more info.
</string>
<!-- Settings Show -->
+2 -1
View File
@@ -18,7 +18,8 @@ limitations under the License.
android:title="@string/settings_sharing" >
<CheckBoxPreference
android:defaultValue="false"
android:key="@string/default_map_public_key" />
android:key="@string/default_map_public_key"
android:title="@string/settings_sharing_new_map_public" />
<CheckBoxPreference
android:defaultValue="false"
android:key="@string/allow_access_key"
@@ -17,7 +17,6 @@
package com.google.android.apps.mytracks.settings;
import com.google.android.apps.mytracks.util.DialogUtils;
import com.google.android.apps.mytracks.util.PreferencesUtils;
import com.google.android.maps.mytracks.R;
import android.app.Dialog;
@@ -48,23 +47,12 @@ public class SharingSettingsActivity extends AbstractSettingsActivity {
defaultMapPublicCheckBoxPreference = (CheckBoxPreference) findPreference(
getString(R.string.default_map_public_key));
defaultMapPublicCheckBoxPreference.setSummaryOn(getString(
R.string.settings_sharing_map_public_summary,
R.string.settings_sharing_new_map_public_summary_on,
getString(R.string.maps_public_unlisted_url)));
defaultMapPublicCheckBoxPreference.setSummaryOff(getString(
R.string.settings_sharing_map_unlisted_summary,
R.string.settings_sharing_new_map_public_summary_off,
getString(R.string.maps_public_unlisted_url)));
boolean defaultMapPublic = PreferencesUtils.getBoolean(
this, R.string.default_map_public_key, PreferencesUtils.DEFAULT_MAP_PUBLIC_DEFAULT);
updateDefaultMapPublicTitle(defaultMapPublic);
defaultMapPublicCheckBoxPreference.setOnPreferenceChangeListener(
new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
updateDefaultMapPublicTitle((Boolean) newValue);
return true;
}
});
allowAccessCheckBoxPreference = (CheckBoxPreference) findPreference(
getString(R.string.allow_access_key));
allowAccessCheckBoxPreference.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@@ -94,14 +82,4 @@ public class SharingSettingsActivity extends AbstractSettingsActivity {
}
});
}
/**
* Updates the title for the default map public check box preference.
*
* @param value the value
*/
private void updateDefaultMapPublicTitle(boolean value) {
defaultMapPublicCheckBoxPreference.setTitle(value ? R.string.settings_sharing_map_public
: R.string.settings_sharing_map_unlisted);
}
}