AccessibilityDelegateCompatpublic class AccessibilityDelegateCompat extends Object Helper for accessing {@link View.AccessibilityDelegate} introduced after
API level 4 in a backwards compatible fashion. |
Fields Summary |
---|
private static final AccessibilityDelegateImpl | IMPL | private static final Object | DEFAULT_DELEGATE | final Object | mBridge |
Constructors Summary |
---|
public AccessibilityDelegateCompat()Creates a new instance.
mBridge = IMPL.newAccessiblityDelegateBridge(this);
|
Methods Summary |
---|
public boolean | dispatchPopulateAccessibilityEvent(android.view.View host, android.view.accessibility.AccessibilityEvent event)Dispatches an {@link AccessibilityEvent} to the host {@link View} first and then
to its children for adding their text content to the event.
The default implementation behaves as
{@link View#dispatchPopulateAccessibilityEvent(AccessibilityEvent)
View#dispatchPopulateAccessibilityEvent(AccessibilityEvent)} for
the case of no accessibility delegate been set.
return IMPL.dispatchPopulateAccessibilityEvent(DEFAULT_DELEGATE, host, event);
| public android.support.v4.view.accessibility.AccessibilityNodeProviderCompat | getAccessibilityNodeProvider(android.view.View host)Gets the provider for managing a virtual view hierarchy rooted at this View
and reported to {@link android.accessibilityservice.AccessibilityService}s
that explore the window content.
The default implementation behaves as
{@link ViewCompat#getAccessibilityNodeProvider(View) ViewCompat#getAccessibilityNodeProvider(View)}
for the case of no accessibility delegate been set.
return IMPL.getAccessibilityNodeProvider(DEFAULT_DELEGATE, host);
| java.lang.Object | getBridge()
return mBridge;
| public void | onInitializeAccessibilityEvent(android.view.View host, android.view.accessibility.AccessibilityEvent event)Initializes an {@link AccessibilityEvent} with information about the
the host View which is the event source.
The default implementation behaves as
{@link ViewCompat#onInitializeAccessibilityEvent(View v, AccessibilityEvent event)
ViewCompat#onInitalizeAccessibilityEvent(View v, AccessibilityEvent event)} for
the case of no accessibility delegate been set.
IMPL.onInitializeAccessibilityEvent(DEFAULT_DELEGATE, host, event);
| public void | onInitializeAccessibilityNodeInfo(android.view.View host, android.support.v4.view.accessibility.AccessibilityNodeInfoCompat info)Initializes an {@link AccessibilityNodeInfoCompat} with information about the host view.
The default implementation behaves as
{@link ViewCompat#onInitializeAccessibilityNodeInfo(View, AccessibilityNodeInfoCompat)
ViewCompat#onInitializeAccessibilityNodeInfo(View, AccessibilityNodeInfoCompat)} for
the case of no accessibility delegate been set.
IMPL.onInitializeAccessibilityNodeInfo(DEFAULT_DELEGATE, host, info);
| public void | onPopulateAccessibilityEvent(android.view.View host, android.view.accessibility.AccessibilityEvent event)Gives a chance to the host View to populate the accessibility event with its
text content.
The default implementation behaves as
{@link ViewCompat#onPopulateAccessibilityEvent(View, AccessibilityEvent)
ViewCompat#onPopulateAccessibilityEvent(AccessibilityEvent)} for
the case of no accessibility delegate been set.
IMPL.onPopulateAccessibilityEvent(DEFAULT_DELEGATE, host, event);
| public boolean | onRequestSendAccessibilityEvent(android.view.ViewGroup host, android.view.View child, android.view.accessibility.AccessibilityEvent event)Called when a child of the host View has requested sending an
{@link AccessibilityEvent} and gives an opportunity to the parent (the host)
to augment the event.
The default implementation behaves as
{@link ViewGroupCompat#onRequestSendAccessibilityEvent(ViewGroup, View, AccessibilityEvent)
ViewGroupCompat#onRequestSendAccessibilityEvent(ViewGroup, View, AccessibilityEvent)} for
the case of no accessibility delegate been set.
return IMPL.onRequestSendAccessibilityEvent(DEFAULT_DELEGATE, host, child, event);
| public boolean | performAccessibilityAction(android.view.View host, int action, android.os.Bundle args)Performs the specified accessibility action on the view. For
possible accessibility actions look at {@link AccessibilityNodeInfoCompat}.
The default implementation behaves as
{@link View#performAccessibilityAction(int, Bundle)
View#performAccessibilityAction(int, Bundle)} for the case of
no accessibility delegate been set.
return IMPL.performAccessibilityAction(DEFAULT_DELEGATE, host, action, args);
| public void | sendAccessibilityEvent(android.view.View host, int eventType)Sends an accessibility event of the given type. If accessibility is not
enabled this method has no effect.
The default implementation behaves as {@link View#sendAccessibilityEvent(int)
View#sendAccessibilityEvent(int)} for the case of no accessibility delegate
been set.
IMPL.sendAccessibilityEvent(DEFAULT_DELEGATE, host, eventType);
| public void | sendAccessibilityEventUnchecked(android.view.View host, android.view.accessibility.AccessibilityEvent event)Sends an accessibility event. This method behaves exactly as
{@link #sendAccessibilityEvent(View, int)} but takes as an argument an
empty {@link AccessibilityEvent} and does not perform a check whether
accessibility is enabled.
The default implementation behaves as
{@link View#sendAccessibilityEventUnchecked(AccessibilityEvent)
View#sendAccessibilityEventUnchecked(AccessibilityEvent)} for
the case of no accessibility delegate been set.
IMPL.sendAccessibilityEventUnchecked(DEFAULT_DELEGATE, host, event);
|
|