diff --git a/res/layout/palette_listview_item.xml b/res/layout/palette_listview_item.xml index 3342ef12f88..e67b7cbf7d0 100644 --- a/res/layout/palette_listview_item.xml +++ b/res/layout/palette_listview_item.xml @@ -28,6 +28,6 @@ android:maxLength="20" android:paddingLeft="@dimen/accessibility_layout_margin_start_end" android:singleLine="true" - android:textSize="14dp" /> + android:textSize="14sp" /> diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml index c88158b081a..f67d0bdf168 100644 --- a/res/values-night/colors.xml +++ b/res/values-night/colors.xml @@ -37,6 +37,5 @@ @color/palette_list_dark_mode_color_cyan @color/palette_list_dark_mode_color_blue @color/palette_list_dark_mode_color_purple - @color/palette_list_dark_mode_color_pink diff --git a/res/values/arrays.xml b/res/values/arrays.xml index c19b948d38f..04557b1b6f1 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -786,7 +786,7 @@ Very small Small - Normal + Default Large Very large @@ -920,7 +920,7 @@ - Use app defaults + Set by app White on black Black on white Yellow on black @@ -1507,7 +1507,6 @@ @string/color_cyan @string/color_blue @string/color_purple - @string/color_pink @@ -1519,7 +1518,6 @@ @color/palette_list_color_cyan @color/palette_list_color_blue @color/palette_list_color_purple - @color/palette_list_color_pink diff --git a/res/values/colors.xml b/res/values/colors.xml index 1c18c6ab39a..06f135f05cf 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -158,7 +158,6 @@ #12b5cb #1a73e8 #9334e6 - #e52592 #f28b82 @@ -168,6 +167,5 @@ #78d9ec #8AB4F8 #c58af9 - #ff8bcb \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 37badce2d6e..7d59090e302 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -4935,9 +4935,9 @@ Shortcut settings - Allow from lock screen + Shortcut from lock screen - When the shortcut is on, you can press both volume keys for 3 seconds to start an accessibility feature. + Allow feature shortcut to turn on from the lock screen. Hold both volume keys for 3 seconds. High contrast text @@ -4987,13 +4987,13 @@ Use color inversion -
Note: Dark colors will turn light. Colors will change in media and images. You can also use Dark theme (Settings > Display).]]>
+
Color inversion also turns dark screens light. Colors will change in media and images.

Note: You can also use Dark theme to display a dark background. Dark theme works with supported apps. Color inversion works on all apps.]]>
- Auto click (dwell timing) + Autoclick (dwell timing) - If you are using a mouse, you can set the cursor to take action automatically when it stops moving for a certain amount of time. + Autoclick works with a connected mouse. You can set the mouse cursor to click automatically when the cursor stops moving for a certain amount of time. - Don\u2019t use auto click (default) + Off Short @@ -5028,16 +5028,18 @@ Open %1$s Use color correction - + Show captions + + For supported app only - Caption appearance + Caption size and style - Text size, caption style + %1$s text size More options - Not all apps support this setting. + Not all apps support these caption preferences Accessibility button @@ -5079,17 +5081,17 @@ Correction mode - Red-green + Deuteranomaly - Green-red + Protanomaly - Blue-yellow + Tritanomaly - Deuteranomaly + Red-green - Protanomaly + Red-green - Tritanomaly + Blue-yellow @@ -7343,8 +7345,6 @@ Orange Purple - - Pink No SIM cards inserted diff --git a/res/xml/captioning_settings.xml b/res/xml/captioning_settings.xml index c8cb46c023d..2a709f2668f 100644 --- a/res/xml/captioning_settings.xml +++ b/res/xml/captioning_settings.xml @@ -18,25 +18,31 @@ + android:persistent="false" + android:title="@string/accessibility_captioning_title"> + android:persistent="false" + android:title="@string/captioning_caption_appearance_title" /> + android:persistent="false" + android:title="@string/captioning_more_options_title" /> + settings:searchable="false"/> diff --git a/src/com/android/settings/accessibility/CaptionPropertiesFragment.java b/src/com/android/settings/accessibility/CaptionPropertiesFragment.java index 8a4efbb0391..43539fd2769 100644 --- a/src/com/android/settings/accessibility/CaptionPropertiesFragment.java +++ b/src/com/android/settings/accessibility/CaptionPropertiesFragment.java @@ -32,6 +32,8 @@ import com.android.settings.SettingsPreferenceFragment; import com.android.settings.search.BaseSearchIndexProvider; import com.android.settingslib.search.SearchIndexable; +import com.google.common.primitives.Floats; + import java.util.ArrayList; import java.util.List; @@ -52,6 +54,7 @@ public class CaptionPropertiesFragment extends SettingsPreferenceFragment private Preference mMoreOptions; private final List mPreferenceList = new ArrayList<>(); + private float[] mFontSizeValuesArray; @Override public int getMetricsCategory() { @@ -66,8 +69,14 @@ public class CaptionPropertiesFragment extends SettingsPreferenceFragment addPreferencesFromResource(R.xml.captioning_settings); initializeAllPreferences(); - updateAllPreferences(); installUpdateListeners(); + initFontSizeValuesArray(); + } + + @Override + public void onResume() { + super.onResume(); + updateAllPreferences(); } private void initializeAllPreferences() { @@ -83,8 +92,19 @@ public class CaptionPropertiesFragment extends SettingsPreferenceFragment mSwitch.setOnPreferenceChangeListener(this); } + private void initFontSizeValuesArray() { + final String[] fontSizeValuesStrArray = getPrefContext().getResources().getStringArray( + R.array.captioning_font_size_selector_values); + final int length = fontSizeValuesStrArray.length; + mFontSizeValuesArray = new float[length]; + for (int i = 0; i < length; ++i) { + mFontSizeValuesArray[i] = Float.parseFloat(fontSizeValuesStrArray[i]); + } + } + private void updateAllPreferences() { mSwitch.setChecked(mCaptioningManager.isEnabled()); + mTextAppearance.setSummary(geTextAppearanceSummary(getPrefContext())); } @Override @@ -103,6 +123,16 @@ public class CaptionPropertiesFragment extends SettingsPreferenceFragment return R.string.help_url_caption; } + private CharSequence geTextAppearanceSummary(Context context) { + final String[] fontSizeSummaries = context.getResources().getStringArray( + R.array.captioning_font_size_selector_titles); + + final float fontSize = mCaptioningManager.getFontScale(); + final int idx = Floats.indexOf(mFontSizeValuesArray, fontSize); + final String fontSizeSummary = fontSizeSummaries[idx == /* not exist */ -1 ? 0 : idx]; + return context.getString(R.string.captioning_caption_appearance_summary, fontSizeSummary); + } + public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER = new BaseSearchIndexProvider(R.xml.captioning_settings); }