content descriptors

This commit is contained in:
danijoo
2016-01-02 22:04:09 +01:00
parent 31c053b9c3
commit 36bd5811be
3 changed files with 4 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ public class NotificationListAdapter extends CursorRecyclerViewAdapter<Notificat
Drawable appIcon = PackageUtils.getApplicationLauncherIcon(context, n.packageName);
ivAppIcon.setImageDrawable(appIcon);
ivAppIcon.setContentDescription(String.format(context.getString(R.string.app_icon_cd), n.appName));
Drawable smallIcon = PackageUtils.getApplicationDrawable(context, n.packageName, n.smallIconId);
ivSmallIcon.setImageDrawable(smallIcon);

View File

@@ -21,6 +21,7 @@
android:orientation="vertical">
<ImageView
android:contentDescription="@string/notification_small_icon_cd"
android:id="@+id/notification_item_smallIcon"
android:layout_width="24dp"
android:layout_height="24dp"

View File

@@ -45,6 +45,8 @@
<string name="create_shedule_snack">Notification sheduled for %1$s</string>
<string name="create_shedule_snack_undo">Undo</string>
<string name="notification_list_empty">No notifications found.</string>
<string name="notification_small_icon_cd">Notification small icon</string>
<string name="app_icon_cd">Application icon for %s</string>
<string-array name="create_categories">
<item>Alarm</item>