Skip to content

Most visited

Recently visited

navigation
added in version 26.1.0
belongs to Maven artifact com.android.support:recyclerview-v7:27.0.0

RecyclerViewAccessibilityDelegate.ItemDelegate

public static class RecyclerViewAccessibilityDelegate.ItemDelegate
extends AccessibilityDelegateCompat

java.lang.Object
   ↳ android.support.v4.view.AccessibilityDelegateCompat
     ↳ android.support.v7.widget.RecyclerViewAccessibilityDelegate.ItemDelegate


The default implementation of accessibility delegate for the individual items of the RecyclerView.

If you are overriding RecyclerViewAccessibilityDelegate#getItemDelegate() but still want to keep some default behavior, you can create an instance of this class and delegate to the parent as necessary.

Summary

Public constructors

RecyclerViewAccessibilityDelegate.ItemDelegate(RecyclerViewAccessibilityDelegate recyclerViewDelegate)

Creates an item delegate for the given RecyclerViewAccessibilityDelegate.

Public methods

void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info)

Initializes an AccessibilityNodeInfoCompat with information about the host view.

boolean performAccessibilityAction(View host, int action, Bundle args)

Performs the specified accessibility action on the view.

Inherited methods

From class android.support.v4.view.AccessibilityDelegateCompat
From class java.lang.Object

Public constructors

RecyclerViewAccessibilityDelegate.ItemDelegate

added in version 26.1.0
RecyclerViewAccessibilityDelegate.ItemDelegate (RecyclerViewAccessibilityDelegate recyclerViewDelegate)

Creates an item delegate for the given RecyclerViewAccessibilityDelegate.

Parameters
recyclerViewDelegate RecyclerViewAccessibilityDelegate: The parent RecyclerView's accessibility delegate.

Public methods

onInitializeAccessibilityNodeInfo

added in version 26.1.0
void onInitializeAccessibilityNodeInfo (View host, 
                AccessibilityNodeInfoCompat info)

Initializes an AccessibilityNodeInfoCompat with information about the host view.

The default implementation behaves as ViewCompat#onInitializeAccessibilityNodeInfo(View, AccessibilityNodeInfoCompat) for the case of no accessibility delegate been set.

Parameters
host View: The View hosting the delegate.

info AccessibilityNodeInfoCompat: The instance to initialize.

performAccessibilityAction

added in version 26.1.0
boolean performAccessibilityAction (View host, 
                int action, 
                Bundle args)

Performs the specified accessibility action on the view. For possible accessibility actions look at AccessibilityNodeInfoCompat.

The default implementation behaves as View#performAccessibilityAction(int, Bundle) for the case of no accessibility delegate been set.

Parameters
host View

action int: The action to perform.

args Bundle

Returns
boolean Whether the action was performed.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)