Update R acessibility assets and strings (1/n)
- Color correction - Color inversion - Magnification - Dwell - Caption preferences - Allow shortcut from lockscreen Bug: 148837311 Test: Manual test Change-Id: I1f5ff3bcbf53dab508311bcea3712ad2b30898eb
This commit is contained in:
@@ -28,6 +28,6 @@
|
||||
android:maxLength="20"
|
||||
android:paddingLeft="@dimen/accessibility_layout_margin_start_end"
|
||||
android:singleLine="true"
|
||||
android:textSize="14dp" />
|
||||
android:textSize="14sp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
@@ -37,6 +37,5 @@
|
||||
<color name="palette_list_color_cyan">@color/palette_list_dark_mode_color_cyan</color>
|
||||
<color name="palette_list_color_blue">@color/palette_list_dark_mode_color_blue</color>
|
||||
<color name="palette_list_color_purple">@color/palette_list_dark_mode_color_purple</color>
|
||||
<color name="palette_list_color_pink">@color/palette_list_dark_mode_color_pink</color>
|
||||
</resources>
|
||||
|
||||
|
@@ -786,7 +786,7 @@
|
||||
<string-array name="captioning_font_size_selector_titles">
|
||||
<item>Very small</item>
|
||||
<item>Small</item>
|
||||
<item>Normal</item>
|
||||
<item>Default</item>
|
||||
<item>Large</item>
|
||||
<item>Very large</item>
|
||||
</string-array>
|
||||
@@ -920,7 +920,7 @@
|
||||
|
||||
<!-- Titles for captioning text style preset preference. [CHAR LIMIT=35] -->
|
||||
<string-array name="captioning_preset_selector_titles" >
|
||||
<item>Use app defaults</item>
|
||||
<item>Set by app</item>
|
||||
<item>White on black</item>
|
||||
<item>Black on white</item>
|
||||
<item>Yellow on black</item>
|
||||
@@ -1507,7 +1507,6 @@
|
||||
<item>@string/color_cyan</item>
|
||||
<item>@string/color_blue</item>
|
||||
<item>@string/color_purple</item>
|
||||
<item>@string/color_pink</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Values for palette list view preference. -->
|
||||
@@ -1519,7 +1518,6 @@
|
||||
<item>@color/palette_list_color_cyan</item>
|
||||
<item>@color/palette_list_color_blue</item>
|
||||
<item>@color/palette_list_color_purple</item>
|
||||
<item>@color/palette_list_color_pink</item>
|
||||
</array>
|
||||
|
||||
<!--String arrays for showing the rtt settings options -->
|
||||
|
@@ -158,7 +158,6 @@
|
||||
<color name="palette_list_color_cyan">#12b5cb</color> <!-- Material Cyan 600 -->
|
||||
<color name="palette_list_color_blue">#1a73e8</color> <!-- Material Blue 600 -->
|
||||
<color name="palette_list_color_purple">#9334e6</color> <!-- Material Purple 600 -->
|
||||
<color name="palette_list_color_pink">#e52592</color> <!-- Material Pink 600 -->
|
||||
|
||||
<!-- Palette list preference dark mode colors. -->
|
||||
<color name="palette_list_dark_mode_color_red">#f28b82</color> <!-- Material Red 300 -->
|
||||
@@ -168,6 +167,5 @@
|
||||
<color name="palette_list_dark_mode_color_cyan">#78d9ec</color> <!-- Material Cyan 300 -->
|
||||
<color name="palette_list_dark_mode_color_blue">#8AB4F8</color> <!-- Material Blue 300 -->
|
||||
<color name="palette_list_dark_mode_color_purple">#c58af9</color> <!-- Material Purple 300 -->
|
||||
<color name="palette_list_dark_mode_color_pink">#ff8bcb</color> <!-- Material Pink 300 -->
|
||||
|
||||
</resources>
|
@@ -4935,9 +4935,9 @@
|
||||
<!-- Label for shortcut settings button. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_shortcut_settings">Shortcut settings</string>
|
||||
<!-- Title for the switch preference that controls whether or not the accessibility shortcut works on the lock screen. [CHAR LIMIT=35] -->
|
||||
<string name="accessibility_shortcut_service_on_lock_screen_title">Allow from lock screen</string>
|
||||
<string name="accessibility_shortcut_service_on_lock_screen_title">Shortcut from lock screen</string>
|
||||
<!-- Description of accessibility shortcut. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_shortcut_description">When the shortcut is on, you can press both volume keys for 3 seconds to start an accessibility feature.</string>
|
||||
<string name="accessibility_shortcut_description">Allow feature shortcut to turn on from the lock screen. Hold both volume keys for 3 seconds.</string>
|
||||
<!-- Title for the accessibility preference to high contrast text. [CHAR LIMIT=35] -->
|
||||
<string name="accessibility_toggle_high_text_contrast_preference_title">High contrast text</string>
|
||||
<!-- Title for the accessibility preference to auto update screen magnification. [CHAR LIMIT=35] -->
|
||||
@@ -4987,13 +4987,13 @@
|
||||
<!-- Used in the accessibility service settings to control turning display color inversion on/off entirely. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_display_inversion_switch_title">Use color inversion</string>
|
||||
<!-- Subtitle for the accessibility preference to configure display color inversion. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_display_inversion_preference_subtitle"><![CDATA[Color inversion turns light screens dark. This helps people who are sensitive to bright light see the screen more easily.<br/><br/>Note: Dark colors will turn light. Colors will change in media and images. You can also use Dark theme (Settings > Display).]]></string>
|
||||
<string name="accessibility_display_inversion_preference_subtitle"><![CDATA[Color inversion turns light screens dark. This feature may be helpful for people who are sensitive to bright light.<br/><br/>Color inversion also turns dark screens light. Colors will change in media and images.<br/><br/>Note: You can also use Dark theme to display a dark background. Dark theme works with supported apps. Color inversion works on all apps.]]></string>
|
||||
<!-- Title for accessibility preference for configuring feature that performs click action soon after mouse/trackpad pointer stops moving. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_autoclick_preference_title">Auto click (dwell timing)</string>
|
||||
<string name="accessibility_autoclick_preference_title">Autoclick (dwell timing)</string>
|
||||
<!-- Footer text to explain what autoclick does -->
|
||||
<string name="accessibility_autoclick_description">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.</string>
|
||||
<string name="accessibility_autoclick_description">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.</string>
|
||||
<!-- Option heading to leave the auto click requirement for accessibility users at its default level. [CHAR LIMIT=50] -->
|
||||
<string name="accessibility_autoclick_default_title">Don\u2019t use auto click (default)</string>
|
||||
<string name="accessibility_autoclick_default_title">Off</string>
|
||||
<!-- Option heading to leave the auto click requirement for accessibility users at its short level. [CHAR LIMIT=35] -->
|
||||
<string name="accessibility_autoclick_short_title">Short</string>
|
||||
<!-- Option summary text for the auto click delay 0.2 seconds radio button. [CHAR LIMIT=35] -->
|
||||
@@ -5028,16 +5028,18 @@
|
||||
<string name="accessibility_service_master_open_title">Open <xliff:g id="accessibility_app_name" example="TalkBack">%1$s</xliff:g></string>
|
||||
<!-- Used in the Color correction settings screen to control turning on/off the feature entirely -->
|
||||
<string name="accessibility_daltonizer_master_switch_title">Use color correction</string>
|
||||
<!-- Used in the Captions settings screen to control turning on/off the feature entirely -->
|
||||
<!-- Title for Captions settings screen to control turning on/off the feature entirely -->
|
||||
<string name="accessibility_caption_master_switch_title">Show captions</string>
|
||||
<!-- Summary for Captions settings screen to control turning on/off the feature entirely [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_caption_master_switch_summary">For supported app only</string>
|
||||
<!-- Title for Caption preference settings screen for configuring font style. [CHAR LIMIT=NONE] -->
|
||||
<string name="captioning_caption_appearance_title">Caption appearance</string>
|
||||
<string name="captioning_caption_appearance_title">Caption size and style</string>
|
||||
<!-- Summary for Captions settings, explaining important settings under it. [CHAR LIMIT=NONE] -->
|
||||
<string name="captioning_caption_appearance_summary">Text size, caption style</string>
|
||||
<string name="captioning_caption_appearance_summary"><xliff:g id="accessibility_font_size" example="Large">%1$s</xliff:g> text size</string>
|
||||
<!-- Title for Caption preference settings screen for configuring language. [CHAR LIMIT=NONE] -->
|
||||
<string name="captioning_more_options_title">More options</string>
|
||||
<!-- Used in the Captions preference to tell users that the setting doesn't support all apps. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_caption_preference_summary">Not all apps support this setting.</string>
|
||||
<string name="accessibility_caption_preference_summary">Not all apps support these caption preferences</string>
|
||||
<!-- Summary for accessibility shortcut preference for software shortcut type. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_shortcut_type_software">Accessibility button</string>
|
||||
<!-- Summary for accessibility shortcut preference for software shortcut type when gesture mode is on. [CHAR LIMIT=NONE] -->
|
||||
@@ -5079,17 +5081,17 @@
|
||||
<!-- Title for the preference to configure the type of color space correction to apply. [CHAR LIMIT=NONE] -->
|
||||
<string name="daltonizer_type">Correction mode</string>
|
||||
<!-- Title shown for deuteranomaly (red-green color blindness) [CHAR LIMIT=45] -->
|
||||
<string name="daltonizer_mode_deuteranomaly_title">Red-green</string>
|
||||
<string name="daltonizer_mode_deuteranomaly_title">Deuteranomaly</string>
|
||||
<!-- Title shown for protanomaly (red-green color blindness) [CHAR LIMIT=45] -->
|
||||
<string name="daltonizer_mode_protanomaly_title">Green-red</string>
|
||||
<string name="daltonizer_mode_protanomaly_title">Protanomaly</string>
|
||||
<!-- Title shown for tritanomaly (blue-yellow color blindness) [CHAR LIMIT=45] -->
|
||||
<string name="daltonizer_mode_tritanomaly_title">Blue-yellow</string>
|
||||
<string name="daltonizer_mode_tritanomaly_title">Tritanomaly</string>
|
||||
<!-- Summary shown for deuteranomaly (red-green color blindness) [CHAR LIMIT=45] -->
|
||||
<string name="daltonizer_mode_deuteranomaly_summary">Deuteranomaly</string>
|
||||
<string name="daltonizer_mode_deuteranomaly_summary">Red-green</string>
|
||||
<!-- Summary shown for protanomaly (red-green color blindness) [CHAR LIMIT=45] -->
|
||||
<string name="daltonizer_mode_protanomaly_summary">Protanomaly</string>
|
||||
<string name="daltonizer_mode_protanomaly_summary">Red-green</string>
|
||||
<!-- Summary shown for tritanomaly (blue-yellow color blindness) [CHAR LIMIT=45] -->
|
||||
<string name="daltonizer_mode_tritanomaly_summary">Tritanomaly</string>
|
||||
<string name="daltonizer_mode_tritanomaly_summary">Blue-yellow</string>
|
||||
|
||||
<!-- Subtitle for the accessibility preference to configure feature that performs click action soon after mouse/trackpad pointer stops moving, in case delay before click is extremely short. Placeholder will be set to the number of milliseconds to which the delay amounts. [CHAR LIMIT=NONE] -->
|
||||
<plurals name="accessibilty_autoclick_preference_subtitle_extremely_short_delay">
|
||||
@@ -7343,8 +7345,6 @@
|
||||
<string name="color_orange">Orange</string>
|
||||
<!-- Purple label. [CHAR LIMIT=40] -->
|
||||
<string name="color_purple">Purple</string>
|
||||
<!-- Pink label. [CHAR LIMIT=40] -->
|
||||
<string name="color_pink">Pink</string>
|
||||
<!-- Message informing the user that no SIM card is inserted [CHAR LIMIT=60] -->
|
||||
<string name="sim_no_inserted_msg">No SIM cards inserted</string>
|
||||
<!-- SIM status title [CHAR LIMIT=40] -->
|
||||
|
@@ -18,25 +18,31 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/accessibility_captioning_title" >
|
||||
android:persistent="false"
|
||||
android:title="@string/accessibility_captioning_title">
|
||||
|
||||
<SwitchPreference
|
||||
android:key="captioning_preference_switch"
|
||||
android:persistent="false"
|
||||
android:summary="@string/accessibility_caption_master_switch_summary"
|
||||
android:title="@string/accessibility_caption_master_switch_title" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.android.settings.accessibility.CaptionAppearanceFragment"
|
||||
android:key="captioning_caption_appearance"
|
||||
android:title="@string/captioning_caption_appearance_title"
|
||||
android:summary="@string/captioning_caption_appearance_summary"
|
||||
android:fragment="com.android.settings.accessibility.CaptionAppearanceFragment" />
|
||||
android:persistent="false"
|
||||
android:title="@string/captioning_caption_appearance_title" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.android.settings.accessibility.CaptionMoreOptionsFragment"
|
||||
android:key="captioning_more_options"
|
||||
android:title="@string/captioning_more_options_title"
|
||||
android:fragment="com.android.settings.accessibility.CaptionMoreOptionsFragment" />
|
||||
android:persistent="false"
|
||||
android:title="@string/captioning_more_options_title" />
|
||||
|
||||
<com.android.settingslib.widget.FooterPreference
|
||||
android:persistent="false"
|
||||
android:selectable="false"
|
||||
android:title="@string/accessibility_caption_preference_summary"
|
||||
android:selectable="false" />
|
||||
settings:searchable="false"/>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
@@ -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<Preference> 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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user