FileDocCategorySizeDatePackage
AccessibilityDelegateCompat.javaAPI DocAndroid 5.1 API20335Thu Mar 12 22:22:56 GMT 2015android.support.v4.view

AccessibilityDelegateCompat

public 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 booleandispatchPopulateAccessibilityEvent(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.

param
host The View hosting the delegate.
param
event The event.
return
True if the event population was completed.
see
View#dispatchPopulateAccessibilityEvent(AccessibilityEvent) View#dispatchPopulateAccessibilityEvent(AccessibilityEvent)

        return IMPL.dispatchPopulateAccessibilityEvent(DEFAULT_DELEGATE, host, event);
    
public android.support.v4.view.accessibility.AccessibilityNodeProviderCompatgetAccessibilityNodeProvider(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
The provider.
see
AccessibilityNodeProviderCompat

        return IMPL.getAccessibilityNodeProvider(DEFAULT_DELEGATE, host);
    
java.lang.ObjectgetBridge()

return
The wrapped bridge implementation.

        return mBridge;
    
public voidonInitializeAccessibilityEvent(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.

param
host The View hosting the delegate.
param
event The event to initialize.
see
ViewCompat#onInitializeAccessibilityEvent(View, AccessibilityEvent) ViewCompat#onInitializeAccessibilityEvent(View, AccessibilityEvent)

        IMPL.onInitializeAccessibilityEvent(DEFAULT_DELEGATE, host, event);
    
public voidonInitializeAccessibilityNodeInfo(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.

param
host The View hosting the delegate.
param
info The instance to initialize.
see
ViewCompat#onInitializeAccessibilityNodeInfo(View, AccessibilityNodeInfoCompat) ViewCompat#onInitializeAccessibilityNodeInfo(View, AccessibilityNodeInfoCompat)

        IMPL.onInitializeAccessibilityNodeInfo(DEFAULT_DELEGATE, host, info);
    
public voidonPopulateAccessibilityEvent(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.

param
host The View hosting the delegate.
param
event The accessibility event which to populate.
see
ViewCompat#onPopulateAccessibilityEvent(View ,AccessibilityEvent) ViewCompat#onPopulateAccessibilityEvent(View, AccessibilityEvent)

        IMPL.onPopulateAccessibilityEvent(DEFAULT_DELEGATE, host, event);
    
public booleanonRequestSendAccessibilityEvent(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.

param
host The View hosting the delegate.
param
child The child which requests sending the event.
param
event The event to be sent.
return
True if the event should be sent
see
ViewGroupCompat#onRequestSendAccessibilityEvent(ViewGroup, View, AccessibilityEvent) ViewGroupCompat#onRequestSendAccessibilityEvent(ViewGroup, View, AccessibilityEvent)

        return IMPL.onRequestSendAccessibilityEvent(DEFAULT_DELEGATE, host, child, event);
    
public booleanperformAccessibilityAction(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.

param
action The action to perform.
return
Whether the action was performed.
see
View#performAccessibilityAction(int, Bundle) View#performAccessibilityAction(int, Bundle)

        return IMPL.performAccessibilityAction(DEFAULT_DELEGATE, host, action, args);
    
public voidsendAccessibilityEvent(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.

param
host The View hosting the delegate.
param
eventType The type of the event to send.
see
View#sendAccessibilityEvent(int) View#sendAccessibilityEvent(int)

        IMPL.sendAccessibilityEvent(DEFAULT_DELEGATE, host, eventType);
    
public voidsendAccessibilityEventUnchecked(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.

param
host The View hosting the delegate.
param
event The event to send.
see
View#sendAccessibilityEventUnchecked(AccessibilityEvent) View#sendAccessibilityEventUnchecked(AccessibilityEvent)

        IMPL.sendAccessibilityEventUnchecked(DEFAULT_DELEGATE, host, event);