public
final
class
AccessibilityEventCompat
extends Object
java.lang.Object | |
↳ | android.support.v4.view.accessibility.AccessibilityEventCompat |
Helper for accessing features in AccessibilityEvent
introduced after API level 4 in a backwards compatible fashion.
Constants | |
---|---|
int |
CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION
Change type for |
int |
CONTENT_CHANGE_TYPE_SUBTREE
Change type for |
int |
CONTENT_CHANGE_TYPE_TEXT
Change type for |
int |
CONTENT_CHANGE_TYPE_UNDEFINED
Change type for |
int |
TYPES_ALL_MASK
Mask for |
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 |
int |
TYPE_VIEW_HOVER_EXIT
Represents the event of a hover exit over a |
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 |
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 |
static
AccessibilityRecordCompat
|
asRecord(AccessibilityEvent event)
Creates an |
static
int
|
getContentChangeTypes(AccessibilityEvent event)
Gets the bit mask of change types signaled by an
|
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. |
static
void
|
setContentChangeTypes(AccessibilityEvent event, int changeTypes)
Sets the bit mask of node tree changes signaled by an
|
Inherited methods | |
---|---|
From
class
java.lang.Object
|
int CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION
Change type for TYPE_WINDOW_CONTENT_CHANGED
event:
The node's content description changed.
Constant Value: 4 (0x00000004)
int CONTENT_CHANGE_TYPE_SUBTREE
Change type for TYPE_WINDOW_CONTENT_CHANGED
event:
A node in the subtree rooted at the source node was added or removed.
Constant Value: 1 (0x00000001)
int CONTENT_CHANGE_TYPE_TEXT
Change type for TYPE_WINDOW_CONTENT_CHANGED
event:
The node's text changed.
Constant Value: 2 (0x00000002)
int CONTENT_CHANGE_TYPE_UNDEFINED
Change type for TYPE_WINDOW_CONTENT_CHANGED
event:
The type of change is not defined.
Constant Value: 0 (0x00000000)
int TYPES_ALL_MASK
Mask for AccessibilityEvent
all types.
See also:
TYPE_VIEW_CLICKED
TYPE_VIEW_LONG_CLICKED
TYPE_VIEW_SELECTED
TYPE_VIEW_FOCUSED
TYPE_VIEW_TEXT_CHANGED
TYPE_WINDOW_STATE_CHANGED
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
TYPE_GESTURE_DETECTION_START
TYPE_GESTURE_DETECTION_END
TYPE_TOUCH_INTERACTION_START
TYPE_TOUCH_INTERACTION_END
Constant Value: -1 (0xffffffff)
int TYPE_ANNOUNCEMENT
Represents the event of an application making an announcement.
Constant Value: 16384 (0x00004000)
int TYPE_GESTURE_DETECTION_END
Represents the event of ending gesture detection.
Constant Value: 524288 (0x00080000)
int TYPE_GESTURE_DETECTION_START
Represents the event of beginning gesture detection.
Constant Value: 262144 (0x00040000)
int TYPE_TOUCH_EXPLORATION_GESTURE_END
Represents the event of ending a touch exploration gesture.
Constant Value: 1024 (0x00000400)
int TYPE_TOUCH_EXPLORATION_GESTURE_START
Represents the event of starting a touch exploration gesture.
Constant Value: 512 (0x00000200)
int TYPE_TOUCH_INTERACTION_END
Represents the event of the user ending to touch the screen.
Constant Value: 2097152 (0x00200000)
int TYPE_TOUCH_INTERACTION_START
Represents the event of the user starting to touch the screen.
Constant Value: 1048576 (0x00100000)
int TYPE_VIEW_ACCESSIBILITY_FOCUSED
Represents the event of gaining accessibility focus.
Constant Value: 32768 (0x00008000)
int TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED
Represents the event of clearing accessibility focus.
Constant Value: 65536 (0x00010000)
int TYPE_VIEW_HOVER_ENTER
Represents the event of a hover enter over a View
.
Constant Value: 128 (0x00000080)
int TYPE_VIEW_HOVER_EXIT
Represents the event of a hover exit over a View
.
Constant Value: 256 (0x00000100)
int TYPE_VIEW_SCROLLED
Represents the event of scrolling a view.
Constant Value: 4096 (0x00001000)
int TYPE_VIEW_TEXT_SELECTION_CHANGED
Represents the event of changing the selection in an EditText
.
Constant Value: 8192 (0x00002000)
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)
int TYPE_WINDOW_CONTENT_CHANGED
Represents the event of changing the content of a window.
Constant Value: 2048 (0x00000800)
void appendRecord (AccessibilityEvent event, AccessibilityRecordCompat record)
Appends an AccessibilityRecord
to the end of
event records.
Parameters | |
---|---|
event |
AccessibilityEvent
|
record |
AccessibilityRecordCompat :
The record to append. |
Throws | |
---|---|
IllegalStateException |
If called from an AccessibilityService. |
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 |
AccessibilityEvent :
The from which to create a record. |
Returns | |
---|---|
AccessibilityRecordCompat |
An AccessibilityRecordCompat .
|
int getContentChangeTypes (AccessibilityEvent event)
Gets the bit mask of change types signaled by an
TYPE_WINDOW_CONTENT_CHANGED
event. A single event may represent
multiple change types.
Parameters | |
---|---|
event |
AccessibilityEvent
|
Returns | |
---|---|
int |
The bit mask of change types. One or more of: |
AccessibilityRecordCompat getRecord (AccessibilityEvent event, int index)
Gets the record at a given index.
Parameters | |
---|---|
event |
AccessibilityEvent
|
index |
int :
The index. |
Returns | |
---|---|
AccessibilityRecordCompat |
The record at the specified index. |
int getRecordCount (AccessibilityEvent event)
Gets the number of records contained in the event.
Parameters | |
---|---|
event |
AccessibilityEvent
|
Returns | |
---|---|
int |
The number of records. |
void setContentChangeTypes (AccessibilityEvent event, int changeTypes)
Sets the bit mask of node tree changes signaled by an
TYPE_WINDOW_CONTENT_CHANGED
event.
Parameters | |
---|---|
event |
AccessibilityEvent
|
changeTypes |
int :
The bit mask of change types. |
Throws | |
---|---|
IllegalStateException |
If called from an AccessibilityService. |