Merge "Cleaning up the accessibility of MultiWaveView"
This commit is contained in:
committed by
Android (Google) Code Review
commit
94444fc561
@@ -902,13 +902,13 @@ public class MultiWaveView extends View {
|
|||||||
String directionDescription = getDirectionDescription(i);
|
String directionDescription = getDirectionDescription(i);
|
||||||
if (!TextUtils.isEmpty(targetDescription)
|
if (!TextUtils.isEmpty(targetDescription)
|
||||||
&& !TextUtils.isEmpty(directionDescription)) {
|
&& !TextUtils.isEmpty(directionDescription)) {
|
||||||
utterance.append(targetDescription);
|
String text = String.format(directionDescription, targetDescription);
|
||||||
utterance.append(" ");
|
utterance.append(text);
|
||||||
utterance.append(directionDescription);
|
}
|
||||||
utterance.append(".");
|
if (utterance.length() > 0) {
|
||||||
|
announceText(utterance.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
announceText(utterance.toString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void announceText(String text) {
|
private void announceText(String text) {
|
||||||
|
|||||||
@@ -131,7 +131,7 @@
|
|||||||
|
|
||||||
android:targetDrawables="@array/lockscreen_targets_with_camera"
|
android:targetDrawables="@array/lockscreen_targets_with_camera"
|
||||||
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"
|
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"
|
||||||
android:directionDescriptions="@array/lockscreen_direction_descriptions_with_camera"
|
android:directionDescriptions="@array/lockscreen_direction_descriptions"
|
||||||
android:handleDrawable="@drawable/ic_lockscreen_handle"
|
android:handleDrawable="@drawable/ic_lockscreen_handle"
|
||||||
android:waveDrawable="@drawable/ic_lockscreen_outerring"
|
android:waveDrawable="@drawable/ic_lockscreen_outerring"
|
||||||
android:outerRadius="@dimen/multiwaveview_target_placement_radius"
|
android:outerRadius="@dimen/multiwaveview_target_placement_radius"
|
||||||
|
|||||||
@@ -136,7 +136,7 @@
|
|||||||
|
|
||||||
android:targetDrawables="@array/lockscreen_targets_with_camera"
|
android:targetDrawables="@array/lockscreen_targets_with_camera"
|
||||||
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"
|
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"
|
||||||
android:directionDescriptions="@array/lockscreen_direction_descriptions_with_camera"
|
android:directionDescriptions="@array/lockscreen_direction_descriptions"
|
||||||
android:handleDrawable="@drawable/ic_lockscreen_handle"
|
android:handleDrawable="@drawable/ic_lockscreen_handle"
|
||||||
android:waveDrawable="@drawable/ic_lockscreen_outerring"
|
android:waveDrawable="@drawable/ic_lockscreen_outerring"
|
||||||
android:outerRadius="@dimen/multiwaveview_target_placement_radius"
|
android:outerRadius="@dimen/multiwaveview_target_placement_radius"
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<item>@string/description_target_soundon</item>
|
<item>@string/description_target_soundon</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<array name="lockscreen_direction_descriptions_when_silent">
|
<array name="lockscreen_direction_descriptions">
|
||||||
<item>@null</item>
|
<item>@null</item>
|
||||||
<item>@string/description_direction_up</item>
|
<item>@string/description_direction_up</item>
|
||||||
<item>@null</item>
|
<item>@null</item>
|
||||||
@@ -55,13 +55,6 @@
|
|||||||
<item>@string/description_target_silent</item>
|
<item>@string/description_target_silent</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<array name="lockscreen_direction_descriptions_when_soundon">
|
|
||||||
<item>@null</item>
|
|
||||||
<item>@string/description_direction_up</item>
|
|
||||||
<item>@null</item>
|
|
||||||
<item>@string/description_direction_down</item>
|
|
||||||
</array>
|
|
||||||
|
|
||||||
<array name="lockscreen_targets_with_camera">
|
<array name="lockscreen_targets_with_camera">
|
||||||
<item>@null</item>
|
<item>@null</item>
|
||||||
<item>@drawable/ic_lockscreen_unlock</item>
|
<item>@drawable/ic_lockscreen_unlock</item>
|
||||||
@@ -76,11 +69,4 @@
|
|||||||
<item>@string/description_target_camera</item>
|
<item>@string/description_target_camera</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<array name="lockscreen_direction_descriptions_with_camera">
|
|
||||||
<item>@null</item>
|
|
||||||
<item>@string/description_direction_up</item>
|
|
||||||
<item>@null</item>
|
|
||||||
<item>@string/description_direction_down</item>
|
|
||||||
</array>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -356,7 +356,7 @@
|
|||||||
<item>@null</item>
|
<item>@null</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<array name="lockscreen_direction_descriptions_when_silent">
|
<array name="lockscreen_direction_descriptions">
|
||||||
<item>@string/description_direction_right</item>
|
<item>@string/description_direction_right</item>
|
||||||
<item>@null</item>
|
<item>@null</item>
|
||||||
<item>@string/description_direction_left</item>
|
<item>@string/description_direction_left</item>
|
||||||
@@ -377,13 +377,6 @@
|
|||||||
<item>@null</item>
|
<item>@null</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<array name="lockscreen_direction_descriptions_when_soundon">
|
|
||||||
<item>@string/description_direction_right</item>
|
|
||||||
<item>@null</item>
|
|
||||||
<item>@string/description_direction_left</item>
|
|
||||||
<item>@null</item>
|
|
||||||
</array>
|
|
||||||
|
|
||||||
<array name="lockscreen_targets_with_camera">
|
<array name="lockscreen_targets_with_camera">
|
||||||
<item>@drawable/ic_lockscreen_unlock</item>
|
<item>@drawable/ic_lockscreen_unlock</item>
|
||||||
<item>@null</item>
|
<item>@null</item>
|
||||||
@@ -398,11 +391,4 @@
|
|||||||
<item>@null</item>
|
<item>@null</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<array name="lockscreen_direction_descriptions_with_camera">
|
|
||||||
<item>@string/description_direction_right</item>
|
|
||||||
<item>@null</item>
|
|
||||||
<item>@string/description_direction_left</item>
|
|
||||||
<item>@null</item>
|
|
||||||
</array>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -3138,13 +3138,13 @@
|
|||||||
<string name="content_description_sliding_handle">"Sliding handle. Tap and hold."</string>
|
<string name="content_description_sliding_handle">"Sliding handle. Tap and hold."</string>
|
||||||
|
|
||||||
<!-- Description of the up direction in which one can to slide the handle in the Slide unlock screen. [CHAR LIMIT=NONE] -->
|
<!-- Description of the up direction in which one can to slide the handle in the Slide unlock screen. [CHAR LIMIT=NONE] -->
|
||||||
<string name="description_direction_up">"Up</string>
|
<string name="description_direction_up">Up for <xliff:g id="target_description" example="Unlock">%s</xliff:g>.</string>
|
||||||
<!-- Description of the down direction in which one can to slide the handle in the Slide unlock screen. [CHAR LIMIT=NONE] -->
|
<!-- Description of the down direction in which one can to slide the handle in the Slide unlock screen. [CHAR LIMIT=NONE] -->
|
||||||
<string name="description_direction_down">Down</string>
|
<string name="description_direction_down">Down for <xliff:g id="target_description" example="Unlock">%s</xliff:g>.</string>
|
||||||
<!-- Description of the left direction in which one can to slide the handle in the Slide unlock screen. [CHAR LIMIT=NONE] -->
|
<!-- Description of the left direction in which one can to slide the handle in the Slide unlock screen. [CHAR LIMIT=NONE] -->
|
||||||
<string name="description_direction_left">"Left</string>
|
<string name="description_direction_left">"Left for <xliff:g id="target_description" example="Unlock">%s</xliff:g>.</string>
|
||||||
<!-- Description of the right direction in which one can to slide the handle in the Slide unlock screen. [CHAR LIMIT=NONE] -->
|
<!-- Description of the right direction in which one can to slide the handle in the Slide unlock screen. [CHAR LIMIT=NONE] -->
|
||||||
<string name="description_direction_right">Right</string>
|
<string name="description_direction_right">Right for <xliff:g id="target_description" example="Unlock">%s</xliff:g>.</string>
|
||||||
|
|
||||||
<!-- Description of the unlock target in the Slide unlock screen. [CHAR LIMIT=NONE] -->
|
<!-- Description of the unlock target in the Slide unlock screen. [CHAR LIMIT=NONE] -->
|
||||||
<string name="description_target_unlock">Unlock</string>
|
<string name="description_target_unlock">Unlock</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user