Merge "Cleaning up the accessibility of MultiWaveView"

This commit is contained in:
Svetoslav Ganov
2011-09-01 13:58:10 -07:00
committed by Android (Google) Code Review
6 changed files with 13 additions and 41 deletions

View File

@@ -902,13 +902,13 @@ public class MultiWaveView extends View {
String directionDescription = getDirectionDescription(i);
if (!TextUtils.isEmpty(targetDescription)
&& !TextUtils.isEmpty(directionDescription)) {
utterance.append(targetDescription);
utterance.append(" ");
utterance.append(directionDescription);
utterance.append(".");
String text = String.format(directionDescription, targetDescription);
utterance.append(text);
}
if (utterance.length() > 0) {
announceText(utterance.toString());
}
}
announceText(utterance.toString());
}
private void announceText(String text) {

View File

@@ -131,7 +131,7 @@
android:targetDrawables="@array/lockscreen_targets_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:waveDrawable="@drawable/ic_lockscreen_outerring"
android:outerRadius="@dimen/multiwaveview_target_placement_radius"

View File

@@ -136,7 +136,7 @@
android:targetDrawables="@array/lockscreen_targets_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:waveDrawable="@drawable/ic_lockscreen_outerring"
android:outerRadius="@dimen/multiwaveview_target_placement_radius"

View File

@@ -34,7 +34,7 @@
<item>@string/description_target_soundon</item>
</array>
<array name="lockscreen_direction_descriptions_when_silent">
<array name="lockscreen_direction_descriptions">
<item>@null</item>
<item>@string/description_direction_up</item>
<item>@null</item>
@@ -55,13 +55,6 @@
<item>@string/description_target_silent</item>
</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">
<item>@null</item>
<item>@drawable/ic_lockscreen_unlock</item>
@@ -76,11 +69,4 @@
<item>@string/description_target_camera</item>
</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>

View File

@@ -356,7 +356,7 @@
<item>@null</item>
</array>
<array name="lockscreen_direction_descriptions_when_silent">
<array name="lockscreen_direction_descriptions">
<item>@string/description_direction_right</item>
<item>@null</item>
<item>@string/description_direction_left</item>
@@ -377,13 +377,6 @@
<item>@null</item>
</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">
<item>@drawable/ic_lockscreen_unlock</item>
<item>@null</item>
@@ -398,11 +391,4 @@
<item>@null</item>
</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>

View File

@@ -3138,13 +3138,13 @@
<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] -->
<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] -->
<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] -->
<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] -->
<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] -->
<string name="description_target_unlock">Unlock</string>