FileDocCategorySizeDatePackage
RecyclerViewAccessibilityDelegate.javaAPI DocAndroid 5.1 API3595Thu Mar 12 22:22:56 GMT 2015android.support.v7.widget

RecyclerViewAccessibilityDelegate

public class RecyclerViewAccessibilityDelegate extends android.support.v4.view.AccessibilityDelegateCompat
The AccessibilityDelegate used by RecyclerView.

This class handles basic accessibility actions and delegates them to LayoutManager.

Fields Summary
final RecyclerView
mRecyclerView
final android.support.v4.view.AccessibilityDelegateCompat
mItemDelegate
Constructors Summary
public RecyclerViewAccessibilityDelegate(RecyclerView recyclerView)

        mRecyclerView = recyclerView;
    
Methods Summary
android.support.v4.view.AccessibilityDelegateCompatgetItemDelegate()

        return mItemDelegate;
    
public voidonInitializeAccessibilityEvent(android.view.View host, android.view.accessibility.AccessibilityEvent event)

        super.onInitializeAccessibilityEvent(host, event);
        event.setClassName(RecyclerView.class.getName());
        if (host instanceof RecyclerView) {
            RecyclerView rv = (RecyclerView) host;
            if (rv.getLayoutManager() != null) {
                rv.getLayoutManager().onInitializeAccessibilityEvent(event);
            }
        }
    
public voidonInitializeAccessibilityNodeInfo(android.view.View host, android.support.v4.view.accessibility.AccessibilityNodeInfoCompat info)

        super.onInitializeAccessibilityNodeInfo(host, info);
        info.setClassName(RecyclerView.class.getName());
        if (mRecyclerView.getLayoutManager() != null) {
            mRecyclerView.getLayoutManager().onInitializeAccessibilityNodeInfo(info);
        }
    
public booleanperformAccessibilityAction(android.view.View host, int action, android.os.Bundle args)

        if (super.performAccessibilityAction(host, action, args)) {
            return true;
        }
        if (mRecyclerView.getLayoutManager() != null) {
            return mRecyclerView.getLayoutManager().performAccessibilityAction(action, args);
        }

        return false;