belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1
AccessibilityDelegateCompat
public class AccessibilityDelegateCompat
extends Object
| java.lang.Object | |
| ↳ | android.support.v4.view.AccessibilityDelegateCompat |
| |
Helper for accessing View.AccessibilityDelegate.
Note: On platform versions prior to API 23, delegate methods on views in the android.widget.* package are called before host methods. This prevents certain properties such as class name from being modified by overriding onInitializeAccessibilityNodeInfo(View, AccessibilityNodeInfoCompat), as any changes will be overwritten by the host class.
Starting in API 23, delegate methods are called after host methods, which all properties to be modified without being overwritten by the host class.
Summary
Public constructors | |
|---|---|
AccessibilityDelegateCompat() Creates a new instance. | |
Public methods | |
|---|---|
boolean | dispatchPopulateAccessibilityEvent(View host, AccessibilityEvent event) Dispatches an |
AccessibilityNodeProviderCompat | getAccessibilityNodeProvider(View host) Gets the provider for managing a virtual view hierarchy rooted at this View and reported to |
void | onInitializeAccessibilityEvent(View host, AccessibilityEvent event) Initializes an |
void | onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) Initializes an |
void | onPopulateAccessibilityEvent(View host, AccessibilityEvent event) Gives a chance to the host View to populate the accessibility event with its text content. |
boolean | onRequestSendAccessibilityEvent(ViewGroup host, View child, AccessibilityEvent event) Called when a child of the host View has requested sending an |
boolean | performAccessibilityAction(View host, int action, Bundle args) Performs the specified accessibility action on the view. |
void | sendAccessibilityEvent(View host, int eventType) Sends an accessibility event of the given type. |
void | sendAccessibilityEventUnchecked(View host, AccessibilityEvent event) Sends an accessibility event. |
Inherited methods | |
|---|---|
java.lang.Object | |
Public constructors
AccessibilityDelegateCompat
AccessibilityDelegateCompat ()
Creates a new instance.
Public methods
dispatchPopulateAccessibilityEvent
boolean dispatchPopulateAccessibilityEvent (View host, AccessibilityEvent event)
Dispatches an AccessibilityEvent to the host View first and then to its children for adding their text content to the event.
The default implementation behaves as View#dispatchPopulateAccessibilityEvent(AccessibilityEvent) for the case of no accessibility delegate been set.
| Parameters | |
|---|---|
host | View: The View hosting the delegate. |
event | AccessibilityEvent: The event. |
| Returns | |
|---|---|
boolean | True if the event population was completed. |
getAccessibilityNodeProvider
AccessibilityNodeProviderCompat getAccessibilityNodeProvider (View host)
Gets the provider for managing a virtual view hierarchy rooted at this View and reported to AccessibilityServices that explore the window content.
The default implementation behaves as ViewCompat#getAccessibilityNodeProvider(View) for the case of no accessibility delegate been set.
| Parameters | |
|---|---|
host | View |
| Returns | |
|---|---|
AccessibilityNodeProviderCompat | The provider. |
See also:
onInitializeAccessibilityEvent
void onInitializeAccessibilityEvent (View host, AccessibilityEvent event)
Initializes an AccessibilityEvent with information about the the host View which is the event source.
The default implementation behaves as ViewCompat#onInitalizeAccessibilityEvent(View v, AccessibilityEvent event) for the case of no accessibility delegate been set.
| Parameters | |
|---|---|
host | View: The View hosting the delegate. |
event | AccessibilityEvent: The event to initialize. |
onInitializeAccessibilityNodeInfo
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. |
onPopulateAccessibilityEvent
void onPopulateAccessibilityEvent (View host, AccessibilityEvent event)
Gives a chance to the host View to populate the accessibility event with its text content.
The default implementation behaves as ViewCompat#onPopulateAccessibilityEvent(AccessibilityEvent) for the case of no accessibility delegate been set.
| Parameters | |
|---|---|
host | View: The View hosting the delegate. |
event | AccessibilityEvent: The accessibility event which to populate. |
onRequestSendAccessibilityEvent
boolean onRequestSendAccessibilityEvent (ViewGroup host, View child, AccessibilityEvent event)
Called when a child of the host View has requested sending an AccessibilityEvent and gives an opportunity to the parent (the host) to augment the event.
The default implementation behaves as ViewGroupCompat#onRequestSendAccessibilityEvent(ViewGroup, View, AccessibilityEvent) for the case of no accessibility delegate been set.
| Parameters | |
|---|---|
host | ViewGroup: The View hosting the delegate. |
child | View: The child which requests sending the event. |
event | AccessibilityEvent: The event to be sent. |
| Returns | |
|---|---|
boolean | True if the event should be sent |
performAccessibilityAction
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. |
sendAccessibilityEvent
void sendAccessibilityEvent (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 View#sendAccessibilityEvent(int) for the case of no accessibility delegate been set.
| Parameters | |
|---|---|
host | View: The View hosting the delegate. |
eventType | int: The type of the event to send. |
See also:
sendAccessibilityEventUnchecked
void sendAccessibilityEventUnchecked (View host, AccessibilityEvent event)
Sends an accessibility event. This method behaves exactly as sendAccessibilityEvent(View, int) but takes as an argument an empty AccessibilityEvent and does not perform a check whether accessibility is enabled.
The default implementation behaves as View#sendAccessibilityEventUnchecked(AccessibilityEvent) for the case of no accessibility delegate been set.
| Parameters | |
|---|---|
host | View: The View hosting the delegate. |
event | AccessibilityEvent: The event to send. |
Annotations
Interfaces
- ActionProvider.VisibilityListener
- AsyncLayoutInflater.OnInflateFinishedListener
- LayoutInflaterFactory
- MenuItemCompat.OnActionExpandListener
- NestedScrollingChild
- NestedScrollingChild2
- NestedScrollingParent
- NestedScrollingParent2
- OnApplyWindowInsetsListener
- ScrollingView
- TintableBackgroundView
- ViewPager.OnAdapterChangeListener
- ViewPager.OnPageChangeListener
- ViewPager.PageTransformer
- ViewPropertyAnimatorListener
- ViewPropertyAnimatorUpdateListener
Classes
- AbsSavedState
- AccessibilityDelegateCompat
- ActionProvider
- AsyncLayoutInflater
- GestureDetectorCompat
- GravityCompat
- InputDeviceCompat
- LayoutInflaterCompat
- MarginLayoutParamsCompat
- MenuCompat
- MenuItemCompat
- MotionEventCompat
- NestedScrollingChildHelper
- NestedScrollingParentHelper
- PagerAdapter
- PagerTabStrip
- PagerTitleStrip
- PointerIconCompat
- ScaleGestureDetectorCompat
- VelocityTrackerCompat
- ViewCompat
- ViewConfigurationCompat
- ViewGroupCompat
- ViewPager
- ViewPager.LayoutParams
- ViewPager.SavedState
- ViewPager.SimpleOnPageChangeListener
- ViewParentCompat
- ViewPropertyAnimatorCompat
- ViewPropertyAnimatorListenerAdapter
- WindowCompat
- WindowInsetsCompat