java.lang.Object | |
↳ | android.support.v4.view.accessibility.AccessibilityRecordCompat |
Helper for accessing AccessibilityRecord
introduced after API level 4 in a backwards compatible fashion.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This constructor is deprecated.
This is not type safe. If you want to modify an
AccessibilityEvent 's properties defined in
AccessibilityRecord use
asRecord(AccessibilityEvent) . This method will be removed
in a subsequent release of the support library.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Compares this instance with the specified object and indicates if they
are equal.
| |||||||||||
Gets the number of added characters.
| |||||||||||
Sets the text before a change.
| |||||||||||
Gets the class name of the source.
| |||||||||||
Gets the description of the source.
| |||||||||||
Gets the index of the source in the list of items the can be visited.
| |||||||||||
Gets the index of the first character of the changed sequence,
or the beginning of a text selection or the index of the first
visible item when scrolling.
| |||||||||||
This method is deprecated.
This method will be removed in a subsequent release of
the support library.
| |||||||||||
Gets the number of items that can be visited.
| |||||||||||
Gets the max scroll offset of the source left edge in pixels.
| |||||||||||
Gets the max scroll offset of the source top edge in pixels.
| |||||||||||
Gets the
Parcelable data. | |||||||||||
Gets the number of removed characters.
| |||||||||||
Gets the scroll offset of the source left edge in pixels.
| |||||||||||
Gets the scroll offset of the source top edge in pixels.
| |||||||||||
Gets the
AccessibilityNodeInfo of
the event source. | |||||||||||
Gets the text of the event.
| |||||||||||
Gets the index of text selection end or the index of the last
visible item when scrolling.
| |||||||||||
Gets the id of the window from which the event comes from.
| |||||||||||
Returns an integer hash code for this object.
| |||||||||||
Gets if the source is checked.
| |||||||||||
Gets if the source is enabled.
| |||||||||||
Gets if the source is taking the entire screen.
| |||||||||||
Gets if the source is a password field.
| |||||||||||
Gets if the source is scrollable.
| |||||||||||
Returns a cached instance if such is available or a new one is
instantiated.
| |||||||||||
Returns a cached instance if such is available or a new one is
instantiated.
| |||||||||||
Return an instance back to be reused.
| |||||||||||
Sets the number of added characters.
| |||||||||||
Sets the text before a change.
| |||||||||||
Sets if the source is checked.
| |||||||||||
Sets the class name of the source.
| |||||||||||
Sets the description of the source.
| |||||||||||
Sets the index of the source in the list of items that can be visited.
| |||||||||||
Sets if the source is enabled.
| |||||||||||
Sets the index of the first character of the changed sequence
or the beginning of a text selection or the index of the first
visible item when scrolling.
| |||||||||||
Sets if the source is taking the entire screen.
| |||||||||||
Sets the number of items that can be visited.
| |||||||||||
Sets the max scroll offset of the source left edge in pixels.
| |||||||||||
Sets the max scroll offset of the source top edge in pixels.
| |||||||||||
Sets the
Parcelable data of the event. | |||||||||||
Sets if the source is a password field.
| |||||||||||
Sets the number of removed characters.
| |||||||||||
Sets the scroll offset of the source left edge in pixels.
| |||||||||||
Sets the scroll offset of the source top edge in pixels.
| |||||||||||
Sets if the source is scrollable.
| |||||||||||
Sets the source to be a virtual descendant of the given
root . | |||||||||||
Sets the event source.
| |||||||||||
Sets the index of text selection end or the index of the last
visible item when scrolling.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
This constructor is deprecated.
This is not type safe. If you want to modify an
AccessibilityEvent
's properties defined in
AccessibilityRecord
use
asRecord(AccessibilityEvent)
. This method will be removed
in a subsequent release of the support library.
Compares this instance with the specified object and indicates if they
are equal. In order to be equal, o
must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be reflexive, symmetric, and transitive.
Also, no object reference other than null is equal to null.
The default implementation returns true
only if this ==
o
. See Writing a correct
equals
method
if you intend implementing your own equals
method.
The general contract for the equals
and hashCode()
methods is that if equals
returns true
for
any two objects, then hashCode()
must return the same value for
these objects. This means that subclasses of Object
usually
override either both methods or neither of them.
obj | the object to compare this instance with. |
---|
true
if the specified object is equal to this Object
; false
otherwise.Gets the number of added characters.
Sets the text before a change.
Gets the description of the source.
Gets the index of the source in the list of items the can be visited.
Gets the index of the first character of the changed sequence, or the beginning of a text selection or the index of the first visible item when scrolling.
This method is deprecated.
This method will be removed in a subsequent release of
the support library.
Gets the number of items that can be visited.
Gets the max scroll offset of the source left edge in pixels.
Gets the max scroll offset of the source top edge in pixels.
Gets the number of removed characters.
Gets the scroll offset of the source left edge in pixels.
Gets the scroll offset of the source top edge in pixels.
Gets the AccessibilityNodeInfo
of
the event source.
Note: It is a client responsibility to recycle the
received info by calling
AccessibilityNodeInfo#recycle()
to avoid creating of multiple instances.
Gets the text of the event. The index in the list represents the priority of the text. Specifically, the lower the index the higher the priority.
Gets the index of text selection end or the index of the last visible item when scrolling.
Gets the id of the window from which the event comes from.
Returns an integer hash code for this object. By contract, any two
objects for which equals(Object)
returns true
must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode
method
if you intend implementing your own hashCode
method.
Gets if the source is checked.
Gets if the source is enabled.
Gets if the source is taking the entire screen.
Gets if the source is a password field.
Gets if the source is scrollable.
Returns a cached instance if such is available or a new one is instantiated.
Returns a cached instance if such is available or a new one is instantiated. The instance is initialized with data from the given record.
Return an instance back to be reused.
Note: You must not touch the object after calling this function.
IllegalStateException | If the record is already recycled. |
---|
Sets the number of added characters.
addedCount | The number of added characters. |
---|
IllegalStateException | If called from an AccessibilityService. |
---|
Sets the text before a change.
beforeText | The text before the change. |
---|
IllegalStateException | If called from an AccessibilityService. |
---|
Sets if the source is checked.
isChecked | True if the view is checked, false otherwise. |
---|
IllegalStateException | If called from an AccessibilityService. |
---|
Sets the class name of the source.
className | The lass name. |
---|
IllegalStateException | If called from an AccessibilityService. |
---|
Sets the description of the source.
contentDescription | The description. |
---|
IllegalStateException | If called from an AccessibilityService. |
---|
Sets the index of the source in the list of items that can be visited.
currentItemIndex | The current item index. |
---|
IllegalStateException | If called from an AccessibilityService. |
---|
Sets if the source is enabled.
isEnabled | True if the view is enabled, false otherwise. |
---|
IllegalStateException | If called from an AccessibilityService. |
---|
Sets the index of the first character of the changed sequence or the beginning of a text selection or the index of the first visible item when scrolling.
fromIndex | The index of the first character or selection start or the first visible item. |
---|
IllegalStateException | If called from an AccessibilityService. |
---|
Sets if the source is taking the entire screen.
isFullScreen | True if the source is full screen, false otherwise. |
---|
IllegalStateException | If called from an AccessibilityService. |
---|
Sets the number of items that can be visited.
itemCount | The number of items. |
---|
IllegalStateException | If called from an AccessibilityService. |
---|
Sets the max scroll offset of the source left edge in pixels.
maxScrollX | The max scroll. |
---|
Sets the max scroll offset of the source top edge in pixels.
maxScrollY | The max scroll. |
---|
Sets the Parcelable
data of the event.
parcelableData | The parcelable data. |
---|
IllegalStateException | If called from an AccessibilityService. |
---|
Sets if the source is a password field.
isPassword | True if the view is a password field, false otherwise. |
---|
IllegalStateException | If called from an AccessibilityService. |
---|
Sets the number of removed characters.
removedCount | The number of removed characters. |
---|
IllegalStateException | If called from an AccessibilityService. |
---|
Sets the scroll offset of the source left edge in pixels.
scrollX | The scroll. |
---|
Sets the scroll offset of the source top edge in pixels.
scrollY | The scroll. |
---|
Sets if the source is scrollable.
scrollable | True if the source is scrollable, false otherwise. |
---|
IllegalStateException | If called from an AccessibilityService. |
---|
Sets the source to be a virtual descendant of the given root
.
If virtualDescendantId
equals to NO_ID
the root
is set as the source.
A virtual descendant is an imaginary View that is reported as a part of the view hierarchy for accessibility purposes. This enables custom views that draw complex content to report them selves as a tree of virtual views, thus conveying their logical structure.
root | The root of the virtual subtree. |
---|---|
virtualDescendantId | The id of the virtual descendant. |
Sets the event source.
source | The source. |
---|
IllegalStateException | If called from an AccessibilityService. |
---|
Sets the index of text selection end or the index of the last visible item when scrolling.
toIndex | The index of selection end or last item index. |
---|