android.support.v4.view.accessibility
Class AccessibilityEventCompat

java.lang.Object
  extended by android.support.v4.view.accessibility.AccessibilityEventCompat

public class AccessibilityEventCompat
extends java.lang.Object

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


Field Summary
static int TYPE_ANNOUNCEMENT
          Represents the event of an application making an announcement.
static int TYPE_TOUCH_EXPLORATION_GESTURE_END
          Represents the event of ending a touch exploration gesture.
static int TYPE_TOUCH_EXPLORATION_GESTURE_START
          Represents the event of starting a touch exploration gesture.
static int TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED
          Represents the event of clearing accessibility focus.
static int TYPE_VIEW_ACCESSIBILITY_FOCUSED
          Represents the event of gaining accessibility focus.
static int TYPE_VIEW_HOVER_ENTER
          Represents the event of a hover enter over a android.view.View.
static int TYPE_VIEW_HOVER_EXIT
          Represents the event of a hover exit over a android.view.View.
static int TYPE_VIEW_SCROLLED
          Represents the event of scrolling a view.
static int TYPE_VIEW_TEXT_SELECTION_CHANGED
          Represents the event of changing the selection in an android.widget.EditText.
static int TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY
          Represents the event of traversing the text of a view at a given movement granularity.
static int TYPE_WINDOW_CONTENT_CHANGED
          Represents the event of changing the content of a window.
static int TYPES_ALL_MASK
          Mask for AccessibilityEvent all types.
 
Method Summary
static void appendRecord(AccessibilityEvent event, AccessibilityRecordCompat record)
          Appends an android.view.accessibility.AccessibilityRecord to the end of event records.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_VIEW_HOVER_ENTER

public static final int TYPE_VIEW_HOVER_ENTER
Represents the event of a hover enter over a android.view.View.

See Also:
Constant Field Values

TYPE_VIEW_HOVER_EXIT

public static final int TYPE_VIEW_HOVER_EXIT
Represents the event of a hover exit over a android.view.View.

See Also:
Constant Field Values

TYPE_TOUCH_EXPLORATION_GESTURE_START

public static final int TYPE_TOUCH_EXPLORATION_GESTURE_START
Represents the event of starting a touch exploration gesture.

See Also:
Constant Field Values

TYPE_TOUCH_EXPLORATION_GESTURE_END

public static final int TYPE_TOUCH_EXPLORATION_GESTURE_END
Represents the event of ending a touch exploration gesture.

See Also:
Constant Field Values

TYPE_WINDOW_CONTENT_CHANGED

public static final int TYPE_WINDOW_CONTENT_CHANGED
Represents the event of changing the content of a window.

See Also:
Constant Field Values

TYPE_VIEW_SCROLLED

public static final int TYPE_VIEW_SCROLLED
Represents the event of scrolling a view.

See Also:
Constant Field Values

TYPE_VIEW_TEXT_SELECTION_CHANGED

public static final int TYPE_VIEW_TEXT_SELECTION_CHANGED
Represents the event of changing the selection in an android.widget.EditText.

See Also:
Constant Field Values

TYPE_ANNOUNCEMENT

public static final int TYPE_ANNOUNCEMENT
Represents the event of an application making an announcement.

See Also:
Constant Field Values

TYPE_VIEW_ACCESSIBILITY_FOCUSED

public static final int TYPE_VIEW_ACCESSIBILITY_FOCUSED
Represents the event of gaining accessibility focus.

See Also:
Constant Field Values

TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED

public static final int TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED
Represents the event of clearing accessibility focus.

See Also:
Constant Field Values

TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY

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.

See Also:
Constant Field Values

TYPES_ALL_MASK

public static final int TYPES_ALL_MASK
Mask for AccessibilityEvent all types.

See Also:
AccessibilityEvent#TYPE_VIEW_CLICKED, AccessibilityEvent#TYPE_VIEW_LONG_CLICKED, AccessibilityEvent#TYPE_VIEW_SELECTED, AccessibilityEvent#TYPE_VIEW_FOCUSED, AccessibilityEvent#TYPE_VIEW_TEXT_CHANGED, AccessibilityEvent#TYPE_WINDOW_STATE_CHANGED, AccessibilityEvent#TYPE_NOTIFICATION_STATE_CHANGED, TYPE_VIEW_HOVER_ENTER, TYPE_VIEW_HOVER_EXIT, TYPE_TOUCH_EXPLORATION_GESTURE_START, TYPE_TOUCH_EXPLORATION_GESTURE_END, TYPE_WINDOW_CONTENT_CHANGED, TYPE_VIEW_SCROLLED, TYPE_VIEW_TEXT_SELECTION_CHANGED, TYPE_ANNOUNCEMENT, TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY, Constant Field Values
Method Detail

getRecordCount

public static int getRecordCount(AccessibilityEvent event)
Gets the number of records contained in the event.

Returns:
The number of records.

appendRecord

public static void appendRecord(AccessibilityEvent event,
                                AccessibilityRecordCompat record)
Appends an android.view.accessibility.AccessibilityRecord to the end of event records.

Parameters:
record - The record to append.
Throws:
java.lang.IllegalStateException - If called from an AccessibilityService.

getRecord

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.