Permalink
Browse files

DisplaySettings: font size in 5% steps from 80% to 130%

Change-Id: I80e490e5e435e39e40f102066eeeeb712e8ba01e
Signed-off-by: Jean-Pierre Rasquin <yank555.lu@gmail.com>
  • Loading branch information...
yank555-lu authored and xlxfoxxlx committed Oct 15, 2016
1 parent bee0170 commit 1c632d9e43b6ac37bbe58ab4610ceccfa57e83ee
View
@@ -143,10 +143,31 @@
<item msgid="490158884605093126">Largest</item>
</string-array>
<string-array name="entries_font_size_percent">
<item >80%</item>
<item >85%</item>
<item >90%</item>
<item >95%</item>
<item >100%</item>
<item >105%</item>
<item >110%</item>
<item >115%</item>
<item >120%</item>
<item >125%</item>
<item >130%</item>
</string-array>
<string-array name="entryvalues_font_size" translatable="false">
<item>0.80</item>
<item>0.85</item>
<item>1.0</item>
<item>0.90</item>
<item>0.95</item>
<item>1.00</item>
<item>1.05</item>
<item>1.10</item>
<item>1.15</item>
<item>1.20</item>
<item>1.25</item>
<item>1.30</item>
</string-array>
@@ -455,7 +455,7 @@ private void updateFontSizeSummary() {
final float currentScale = Settings.System.getFloat(context.getContentResolver(),
Settings.System.FONT_SCALE, 1.0f);
final Resources res = context.getResources();
final String[] entries = res.getStringArray(R.array.entries_font_size);
final String[] entries = res.getStringArray(R.array.entries_font_size_percent);
final String[] strEntryValues = res.getStringArray(R.array.entryvalues_font_size);
final int index = ToggleFontSizePreferenceFragment.fontSizeValueToIndex(currentScale,
strEntryValues);
@@ -43,7 +43,7 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
Resources res = getContext().getResources();
final ContentResolver resolver = getContext().getContentResolver();
// Mark the appropriate item in the preferences list.
mEntries = res.getStringArray(R.array.entries_font_size);
mEntries = res.getStringArray(R.array.entries_font_size_percent);
final String[] strEntryValues = res.getStringArray(R.array.entryvalues_font_size);
final float currentScale =
Settings.System.getFloat(resolver, Settings.System.FONT_SCALE, 1.0f);

0 comments on commit 1c632d9

Please sign in to comment.