Add content description to screensaver customization button
This will let users know which screensaver they are customizing. Fixes: 267582102 Test: flashed device and enabled talkback, opened screensaver settings, and verified talkback correctly says the name of the screensaver Change-Id: I9d0d9422f06b7a78efca0e6953b73fe612f79e2a
This commit is contained in:
@@ -14451,6 +14451,8 @@
|
||||
|
||||
<!-- Button to customize the screensaver [CHAR LIMIT=20] -->
|
||||
<string name="customize_button_title">Customize</string>
|
||||
<!-- The content description for accessibility tools of the customize button. It specifies which screensaver the user is customizing [CHAR LIMIT=NONE] -->
|
||||
<string name="customize_button_description">Customize <xliff:g id="screensaver_name" example="Art Gallery">%1$s</xliff:g></string>
|
||||
|
||||
<!-- Dialog body text used to explain a reboot is required after enabling freeform support for
|
||||
it to work [CHAR LIMIT=none] -->
|
||||
|
@@ -129,6 +129,9 @@ public class DreamAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||
// This must be called AFTER itemView.setSelected above, in order to keep the
|
||||
// customize button in an unselected state.
|
||||
mCustomizeButton.setSelected(false);
|
||||
mCustomizeButton.setContentDescription(
|
||||
mContext.getResources().getString(R.string.customize_button_description,
|
||||
item.getTitle()));
|
||||
}
|
||||
|
||||
setEnabledStateOnViews(itemView, mEnabled);
|
||||
|
Reference in New Issue
Block a user