mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-24 02:12:15 -05:00
Don't combine strings in code
This commit is contained in:
parent
4792cfa91d
commit
abc765e893
@ -916,6 +916,8 @@ Please submit bug reports, contribute new features and ask questions at
|
|||||||
<string name="font_size_message_view_subject">Subject</string>
|
<string name="font_size_message_view_subject">Subject</string>
|
||||||
<string name="font_size_message_view_date">Time and date</string>
|
<string name="font_size_message_view_date">Time and date</string>
|
||||||
<string name="font_size_message_view_content">Message body</string>
|
<string name="font_size_message_view_content">Message body</string>
|
||||||
|
<string name="font_size_message_view_content_summary"><xliff:g id="fontsize">%d</xliff:g>%%</string>
|
||||||
|
<string name="font_size_message_view_content_dialog_title"><xliff:g id="title">%1$s</xliff:g>: <xliff:g id="summary">%2$s</xliff:g></string>
|
||||||
|
|
||||||
<string name="font_size_message_compose">Message composition</string>
|
<string name="font_size_message_compose">Message composition</string>
|
||||||
<string name="font_size_message_compose_input">Text input fields</string>
|
<string name="font_size_message_compose_input">Text input fields</string>
|
||||||
@ -929,12 +931,6 @@ Please submit bug reports, contribute new features and ask questions at
|
|||||||
<string name="font_size_large">Large</string>
|
<string name="font_size_large">Large</string>
|
||||||
<string name="font_size_larger">Larger</string>
|
<string name="font_size_larger">Larger</string>
|
||||||
|
|
||||||
<string name="font_size_webview_smaller">Smallest</string>
|
|
||||||
<string name="font_size_webview_small">Smaller</string>
|
|
||||||
<string name="font_size_webview_normal">Normal</string>
|
|
||||||
<string name="font_size_webview_large">Larger</string>
|
|
||||||
<string name="font_size_webview_larger">Largest</string>
|
|
||||||
|
|
||||||
<!-- Note: Contains references to preferences_action and misc_preferences_attachment_title -->
|
<!-- Note: Contains references to preferences_action and misc_preferences_attachment_title -->
|
||||||
<string name="message_compose_buggy_gallery">Check \"Settings\" -> \"Use Gallery bug work-around\" to be able to attach images or videos using Gallery 3D.</string>
|
<string name="message_compose_buggy_gallery">Check \"Settings\" -> \"Use Gallery bug work-around\" to be able to attach images or videos using Gallery 3D.</string>
|
||||||
|
|
||||||
|
@ -122,6 +122,8 @@ public class FontSizeSettings extends K9PreferenceActivity {
|
|||||||
mMessageViewContentSlider = (SliderPreference) findPreference(
|
mMessageViewContentSlider = (SliderPreference) findPreference(
|
||||||
PREFERENCE_MESSAGE_VIEW_CONTENT_FONT_SLIDER);
|
PREFERENCE_MESSAGE_VIEW_CONTENT_FONT_SLIDER);
|
||||||
|
|
||||||
|
final String summaryFormat = getString(R.string.font_size_message_view_content_summary);
|
||||||
|
final String titleFormat = getString(R.string.font_size_message_view_content_dialog_title);
|
||||||
mMessageViewContentSlider.setValue(scaleFromInt(fontSizes.getMessageViewContentAsPercent()));
|
mMessageViewContentSlider.setValue(scaleFromInt(fontSizes.getMessageViewContentAsPercent()));
|
||||||
mMessageViewContentSlider.setOnPreferenceChangeListener(
|
mMessageViewContentSlider.setOnPreferenceChangeListener(
|
||||||
new Preference.OnPreferenceChangeListener() {
|
new Preference.OnPreferenceChangeListener() {
|
||||||
@ -130,8 +132,9 @@ public class FontSizeSettings extends K9PreferenceActivity {
|
|||||||
public boolean onPreferenceChange(final Preference preference, final Object newValue) {
|
public boolean onPreferenceChange(final Preference preference, final Object newValue) {
|
||||||
final SliderPreference slider = (SliderPreference) preference;
|
final SliderPreference slider = (SliderPreference) preference;
|
||||||
final Float value = (Float) newValue;
|
final Float value = (Float) newValue;
|
||||||
slider.setSummary(String.valueOf(scaleToInt(value) + "%"));
|
slider.setSummary(String.format(summaryFormat, scaleToInt(value)));
|
||||||
slider.setDialogTitle(slider.getTitle() + " " + slider.getSummary());
|
slider.setDialogTitle(
|
||||||
|
String.format(titleFormat, slider.getTitle(), slider.getSummary()));
|
||||||
if (slider.getDialog() != null) {
|
if (slider.getDialog() != null) {
|
||||||
slider.getDialog().setTitle(slider.getDialogTitle());
|
slider.getDialog().setTitle(slider.getDialogTitle());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user