am 9f9d7350: Merge "Announce wallpaper selection for accessibility" into jb-ub-now-indigo-rose
* commit '9f9d735028d430d266e4b2f287be0830ee132f4d': Announce wallpaper selection for accessibility
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user