summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/values/strings.xml2
-rw-r--r--src/com/android/launcher3/WallpaperPickerActivity.java5
2 files changed, 7 insertions, 0 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 9f4f20bfa..3e2ffce60 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -41,6 +41,8 @@
<!-- Accessibility string used as a label for a particular wallpaper in the Wallpaper Picker list.
e.g. "Wallpaper 3 of 10" -->
<string name="wallpaper_accessibility_name">Wallpaper %1$d of %2$d</string>
+ <!-- Accessibility string used to announce that an item has been selected. -->
+ <string name="announce_selection">Selected <xliff:g id="label" example="Wallpaper 3 of 10">%1$s</xliff:g></string>
<!-- Label on button to delete wallpaper(s) -->
<string name="wallpaper_delete">Delete</string>
diff --git a/src/com/android/launcher3/WallpaperPickerActivity.java b/src/com/android/launcher3/WallpaperPickerActivity.java
index 9d3164bc9..39921705c 100644
--- a/src/com/android/launcher3/WallpaperPickerActivity.java
+++ b/src/com/android/launcher3/WallpaperPickerActivity.java
@@ -52,6 +52,7 @@ import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
+import android.view.accessibility.AccessibilityEvent;
import android.view.animation.DecelerateInterpolator;
import android.widget.BaseAdapter;
import android.widget.FrameLayout;
@@ -254,6 +255,10 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
}
mSelectedThumb = v;
v.setSelected(true);
+ // TODO: Remove this once the accessibility framework and
+ // services have better support for selection state.
+ v.announceForAccessibility(
+ getString(R.string.announce_selection, v.getContentDescription()));
}
info.onClick(WallpaperPickerActivity.this);
}