Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ViewCompat.setAccessibilityDelegate(itemView, object: AccessibilityDelegateCompat() {
override fun onInitializeAccessibilityNodeInfo(host: View, info: AccessibilityNodeInfoCompat) {
super.onInitializeAccessibilityNodeInfo(host, info)
info.addAction(AccessibilityActionCompat(, "play video"))
override fun performAccessibilityAction(host: View?, action: Int, args: Bundle?): Boolean {
if (action == {
// TODO: take action
return true;
return super.performAccessibilityAction(host, action, args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.