Add context to widget dimensions for accessibility.

am: 6c61323998

Change-Id: I5cd9cce4d842a17bafc68b31a09dcf0a62949c1e
This commit is contained in:
Jon Miranda
2016-09-19 23:19:13 +00:00
committed by android-build-merger
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -46,6 +46,8 @@
<!-- The format string for the dimensions of a widget in the drawer -->
<!-- There is a special version of this format string for Farsi -->
<string name="widget_dims_format">%1$d \u00d7 %2$d</string>
<!-- Accessibility spoken message format for the dimensions of a widget in the drawer -->
<string name="widget_accessible_dims_format">%1$d wide by %2$d high</string>
<!-- All Apps -->
<!-- Search bar text in the apps view. [CHAR_LIMIT=50] -->
@@ -135,6 +135,8 @@ public class WidgetCell extends LinearLayout implements OnLayoutChangeListener {
mWidgetName.setText(mItem.label);
mWidgetDims.setText(getContext().getString(R.string.widget_dims_format,
mItem.spanX, mItem.spanY));
mWidgetDims.setContentDescription(getContext().getString(
R.string.widget_accessible_dims_format, mItem.spanX, mItem.spanY));
mWidgetPreviewLoader = loader;
if (item.activityInfo != null) {