Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

AccessibilityEventCompat

extends Object
java.lang.Object
   ↳ android.support.v4.view.accessibility.AccessibilityEventCompat

Class Overview

Helper for accessing features in AccessibilityEvent introduced after API level 4 in a backwards compatible fashion.

Summary

Constants
int TYPES_ALL_MASK Mask for AccessibilityEvent all types.
int TYPE_ANNOUNCEMENT Represents the event of an application making an announcement.
int TYPE_GESTURE_DETECTION_END Represents the event of ending gesture detection.
int TYPE_GESTURE_DETECTION_START Represents the event of beginning gesture detection.
int TYPE_TOUCH_EXPLORATION_GESTURE_END Represents the event of ending a touch exploration gesture.
int TYPE_TOUCH_EXPLORATION_GESTURE_START Represents the event of starting a touch exploration gesture.
int TYPE_TOUCH_INTERACTION_END Represents the event of the user ending to touch the screen.
int TYPE_TOUCH_INTERACTION_START Represents the event of the user starting to touch the screen.
int TYPE_VIEW_ACCESSIBILITY_FOCUSED Represents the event of gaining accessibility focus.
int TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED Represents the event of clearing accessibility focus.
int TYPE_VIEW_HOVER_ENTER Represents the event of a hover enter over a View .
int TYPE_VIEW_HOVER_EXIT Represents the event of a hover exit over a View .
int TYPE_VIEW_SCROLLED Represents the event of scrolling a view.
int TYPE_VIEW_TEXT_SELECTION_CHANGED Represents the event of changing the selection in an EditText .
int TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY Represents the event of traversing the text of a view at a given movement granularity.
int TYPE_WINDOW_CONTENT_CHANGED Represents the event of changing the content of a window.
Public Methods
static void appendRecord ( AccessibilityEvent event, AccessibilityRecordCompat record)
Appends an AccessibilityRecord to the end of event records.
static AccessibilityRecordCompat asRecord ( AccessibilityEvent event)
Creates an AccessibilityRecordCompat from an AccessibilityEvent that can be used to manipulate the event properties defined in AccessibilityRecord .
static AccessibilityRecordCompat getRecord ( AccessibilityEvent event, int index)
Gets the record at a given index.
static int getRecordCount ( AccessibilityEvent event)
Gets the number of records contained in the event.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int TYPE_ANNOUNCEMENT

Represents the event of an application making an announcement.

Constant Value: 16384 (0x00004000)

public static final int TYPE_GESTURE_DETECTION_END

Represents the event of ending gesture detection.

Constant Value: 524288 (0x00080000)

public static final int TYPE_GESTURE_DETECTION_START

Represents the event of beginning gesture detection.

Constant Value: 262144 (0x00040000)

public static final int TYPE_TOUCH_EXPLORATION_GESTURE_END

Represents the event of ending a touch exploration gesture.

Constant Value: 1024 (0x00000400)

public static final int TYPE_TOUCH_EXPLORATION_GESTURE_START

Represents the event of starting a touch exploration gesture.

Constant Value: 512 (0x00000200)

public static final int TYPE_TOUCH_INTERACTION_END

Represents the event of the user ending to touch the screen.

Constant Value: 2097152 (0x00200000)

public static final int TYPE_TOUCH_INTERACTION_START

Represents the event of the user starting to touch the screen.

Constant Value: 1048576 (0x00100000)

public static final int TYPE_VIEW_ACCESSIBILITY_FOCUSED

Represents the event of gaining accessibility focus.

Constant Value: 32768 (0x00008000)

public static final int TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED

Represents the event of clearing accessibility focus.

Constant Value: 65536 (0x00010000)

public static final int TYPE_VIEW_HOVER_ENTER

Represents the event of a hover enter over a View .

Constant Value: 128 (0x00000080)

public static final int TYPE_VIEW_HOVER_EXIT

Represents the event of a hover exit over a View .

Constant Value: 256 (0x00000100)

public static final int TYPE_VIEW_SCROLLED

Represents the event of scrolling a view.

Constant Value: 4096 (0x00001000)

public static final int TYPE_VIEW_TEXT_SELECTION_CHANGED

Represents the event of changing the selection in an EditText .

Constant Value: 8192 (0x00002000)

public static final int TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY

Represents the event of traversing the text of a view at a given movement granularity.

Constant Value: 131072 (0x00020000)

public static final int TYPE_WINDOW_CONTENT_CHANGED

Represents the event of changing the content of a window.

Constant Value: 2048 (0x00000800)

Public Methods

public static void appendRecord ( AccessibilityEvent event, AccessibilityRecordCompat record)

Appends an AccessibilityRecord to the end of event records.

Parameters
record The record to append.
Throws
IllegalStateException If called from an AccessibilityService.

public static AccessibilityRecordCompat asRecord ( AccessibilityEvent event)

Creates an AccessibilityRecordCompat from an AccessibilityEvent that can be used to manipulate the event properties defined in AccessibilityRecord .

Note: Do not call recycle() on the returned AccessibilityRecordCompat . Call recycle() in case you want to recycle the event.

Parameters
event The from which to create a record.

public static AccessibilityRecordCompat getRecord ( AccessibilityEvent event, int index)

Gets the record at a given index.

Parameters
index The index.
Returns
  • The record at the specified index.

public static int getRecordCount ( AccessibilityEvent event)

Gets the number of records contained in the event.

Returns
  • The number of records.