See Also: AccessibilityEvent Members
This class represents accessibility events that are sent by the system when something notable happens in the user interface. For example, when a Android.Widget.Button is clicked, a Android.Views.View is focused, etc.
An accessibility event is fired by an individual view which populates the event with data for its state and requests from its parent to send the event to interested parties. The parent can optionally add an Android.Views.Accessibility.AccessibilityRecord for itself before dispatching a similar request to its parent. A parent can also choose not to respect the request for sending an event. The accessibility event is sent by the topmost view in the view tree. Therefore, an Android.AccessibilityServices.AccessibilityService can explore all records in an accessibility event to obtain more information about the context in which the event was fired.
The main purpose of an accessibility event is to expose enough information for an Android.AccessibilityServices.AccessibilityService to provide meaningful feedback to the user. Sometimes however, an accessibility service may need more contextual information then the one in the event pay-load. In such cases the service can obtain the event source which is an Android.Views.Accessibility.AccessibilityNodeInfo (snapshot of a View state) which can be used for exploring the window content. Note that the privilege for accessing an event's source, thus the window content, has to be explicitly requested. For more details refer to Android.AccessibilityServices.AccessibilityService. If an accessibility service has not requested to retrieve the window content the event will not contain reference to its source. Also for events of type AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED the source is never available.
This class represents various semantically different accessibility event types. Each event type has an associated set of related properties. In other words, each event type is characterized via a subset of the properties exposed by this class. For each event type there is a corresponding constant defined in this class. Follows a specification of the event types and their associated properties:
For more information about creating and processing AccessibilityEvents, read the Accessibility developer guide.
VIEW TYPES
View clicked - represents the event of clicking on a Android.Views.View
like Android.Widget.Button, Android.Widget.CompoundButton, etc.
Type:AccessibilityEvent.TYPE_VIEW_CLICKEDProperties:
View long clicked - represents the event of long clicking on a Android.Views.View
like Android.Widget.Button, Android.Widget.CompoundButton, etc
Type:AccessibilityEvent.TYPE_VIEW_LONG_CLICKEDProperties:
View selected - represents the event of selecting an item usually in
the context of an Android.Widget.AdapterView.
Type:AccessibilityEvent.TYPE_VIEW_SELECTEDProperties:
View focused - represents the event of focusing a
Android.Views.View.
Type:AccessibilityEvent.TYPE_VIEW_FOCUSEDProperties:
View text changed - represents the event of changing the text of an
Android.Widget.EditText.
Type:AccessibilityEvent.TYPE_VIEW_TEXT_CHANGEDProperties:
View text selection changed - represents the event of changing the text
selection of an Android.Widget.EditText.
Type:AccessibilityEvent.TYPE_VIEW_TEXT_SELECTION_CHANGEDProperties:
View scrolled - represents the event of scrolling a view. If
the source is a descendant of Android.Widget.AdapterView the
scroll is reported in terms of visible items - the first visible item,
the last visible item, and the total items - because the the source
is unaware of its pixel size since its adapter is responsible for
creating views. In all other cases the scroll is reported as the current
scroll on the X and Y axis respectively plus the height of the source in
pixels.
Type:AccessibilityEvent.TYPE_VIEW_SCROLLEDProperties:
TRANSITION TYPES
Window state changed - represents the event of opening a
Android.Widget.PopupWindow, Android.Views.Menu,
Android.App.Dialog, etc.
Type:AccessibilityEvent.TYPE_WINDOW_STATE_CHANGEDProperties:
Window content changed - represents the event of change in the
content of a window. This change can be adding/removing view, changing
a view size, etc.
Note: This event is fired only for the window source of the
last accessibility event different from AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED
and its purpose is to notify clients that the content of the user interaction
window has changed.
Type:AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGEDProperties:
Windows changed - represents the event of changes in the windows shown on
the screen such as a window appeared, a window disappeared, a window size changed,
a window layer changed, etc.
Type:AccessibilityEvent.TYPE_WINDOWS_CHANGEDProperties:
NOTIFICATION TYPES
Notification state changed - represents the event showing
Android.App.Notification.
Type:AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGEDProperties:
EXPLORATION TYPES
View hover enter - represents the event of beginning to hover
over a Android.Views.View. The hover may be generated via
exploring the screen by touch or via a pointing device.
Type:AccessibilityEvent.TYPE_VIEW_HOVER_ENTERProperties:
Type:AccessibilityEvent.TYPE_TOUCH_INTERACTION_START
Properties:
Type:AccessibilityEvent.TYPE_TOUCH_INTERACTION_END
Properties:
Type:AccessibilityEvent.TYPE_TOUCH_EXPLORATION_GESTURE_START
Properties:
Type:AccessibilityEvent.TYPE_TOUCH_EXPLORATION_GESTURE_END
Properties:
Type:AccessibilityEvent.TYPE_GESTURE_DETECTION_START
Properties:
Type:AccessibilityEvent.TYPE_GESTURE_DETECTION_END
Properties:
Announcement - represents the event of an application making an
announcement. Usually this announcement is related to some sort of a context
change for which none of the events representing UI transitions is a good fit.
For example, announcing a new page in a book.
Type:AccessibilityEvent.TYPE_ANNOUNCEMENTProperties:
Security note
Since an event contains the text of its source privacy can be compromised by leaking sensitive information such as passwords. To address this issue any event fired in response to manipulation of a PASSWORD field does NOT CONTAIN the text of the password.