Most visited

Recently visited

RecyclerViewAccessibilityDelegate

public class RecyclerViewAccessibilityDelegate
extends AccessibilityDelegateCompat

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


RecyclerView使用的AccessibilityDelegate。

该类处理基本的辅助功能操作并将它们委托给LayoutManager。

Summary

Public constructors

RecyclerViewAccessibilityDelegate(RecyclerView recyclerView)

Public methods

AccessibilityDelegateCompat getItemDelegate()

获取RecyclerView中单个项目的AccessibilityDelegate。

void onInitializeAccessibilityEvent(View host, AccessibilityEvent event)

使用有关作为事件源的主机View的信息初始化 AccessibilityEvent

void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info)

使用有关主机视图的信息初始化 AccessibilityNodeInfoCompat

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

在视图上执行指定的辅助功能操作。

Inherited methods

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

Public constructors

RecyclerViewAccessibilityDelegate

RecyclerViewAccessibilityDelegate (RecyclerView recyclerView)

Parameters
recyclerView RecyclerView

Public methods

getItemDelegate

AccessibilityDelegateCompat getItemDelegate ()

获取RecyclerView中单个项目的AccessibilityDelegate。 基本项目委托是默认提供的,但您可以覆盖此方法以提供自定义每项目委托。

Returns
AccessibilityDelegateCompat

onInitializeAccessibilityEvent

void onInitializeAccessibilityEvent (View host, 
                AccessibilityEvent event)

使用有关作为事件源的主机View的信息初始化 AccessibilityEvent

对于没有设置可访问性委托的情况,默认实现行为为 ViewCompat#onInitalizeAccessibilityEvent(View v, AccessibilityEvent event)

Parameters
host View: The View hosting the delegate.
event AccessibilityEvent: The event to initialize.

onInitializeAccessibilityNodeInfo

void onInitializeAccessibilityNodeInfo (View host, 
                AccessibilityNodeInfoCompat info)

使用有关主机视图的信息初始化 AccessibilityNodeInfoCompat

在没有设置可访问性委托的情况下,默认实现的行为为 ViewCompat#onInitializeAccessibilityNodeInfo(View, AccessibilityNodeInfoCompat)

Parameters
host View: The View hosting the delegate.
info AccessibilityNodeInfoCompat: The instance to initialize.

performAccessibilityAction

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

在视图上执行指定的辅助功能操作。 有关可能的辅助功能操作,请AccessibilityNodeInfoCompat

对于未设置可访问性委托的情况,默认实现的行为为 View#performAccessibilityAction(int, Bundle)

Parameters
host View
action int: The action to perform.
args Bundle
Returns
boolean Whether the action was performed.

Hooray!