Google is committed to advancing racial equity for Black communities. See how.

AccessibilityRecordCompat

open class AccessibilityRecordCompat
kotlin.Any
   ↳ androidx.core.view.accessibility.AccessibilityRecordCompat

Helper for accessing AccessibilityRecord.

Summary

Public constructors
<init>(record: Any!)

Public methods
open Boolean
equals(other: Any?)

open Int

Gets the number of added characters.

open CharSequence!

Sets the text before a change.

open CharSequence!

Gets the class name of the source.

open CharSequence!

Gets the description of the source.

open Int

Gets the index of the source in the list of items the can be visited.

open Int

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.

open Any!

open Int

Gets the number of items that can be visited.

open Int

Gets the max scroll offset of the source left edge in pixels.

open static Int

Gets the max scroll offset of the source left edge in pixels.

open Int

Gets the max scroll offset of the source top edge in pixels.

open static Int

Gets the max scroll offset of the source top edge in pixels.

open Parcelable!

Gets the Parcelable data.

open Int

Gets the number of removed characters.

open Int

Gets the scroll offset of the source left edge in pixels.

open Int

Gets the scroll offset of the source top edge in pixels.

open AccessibilityNodeInfoCompat!

Gets the android.view.accessibility.AccessibilityNodeInfo of the event source.

open MutableList<CharSequence!>!

Gets the text of the event.

open Int

Gets the index of text selection end or the index of the last visible item when scrolling.

open Int

Gets the id of the window from which the event comes from.

open Int

open Boolean

Gets if the source is checked.

open Boolean

Gets if the source is enabled.

open Boolean

Gets if the source is taking the entire screen.

open Boolean

Gets if the source is a password field.

open Boolean

Gets if the source is scrollable.

open static AccessibilityRecordCompat!

Returns a cached instance if such is available or a new one is instantiated.

open static AccessibilityRecordCompat!

Returns a cached instance if such is available or a new one is instantiated.

open Unit

Return an instance back to be reused.

open Unit
setAddedCount(addedCount: Int)

Sets the number of added characters.

open Unit

Sets the text before a change.

open Unit
setChecked(isChecked: Boolean)

Sets if the source is checked.

open Unit

Sets the class name of the source.

open Unit
setContentDescription(contentDescription: CharSequence!)

Sets the description of the source.

open Unit
setCurrentItemIndex(currentItemIndex: Int)

Sets the index of the source in the list of items that can be visited.

open Unit
setEnabled(isEnabled: Boolean)

Sets if the source is enabled.

open Unit
setFromIndex(fromIndex: Int)

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.

open Unit
setFullScreen(isFullScreen: Boolean)

Sets if the source is taking the entire screen.

open Unit
setItemCount(itemCount: Int)

Sets the number of items that can be visited.

open Unit
setMaxScrollX(maxScrollX: Int)

Sets the max scroll offset of the source left edge in pixels.

open static Unit
setMaxScrollX(record: AccessibilityRecord!, maxScrollX: Int)

Sets the max scroll offset of the source left edge in pixels.

open Unit
setMaxScrollY(maxScrollY: Int)

Sets the max scroll offset of the source top edge in pixels.

open static Unit
setMaxScrollY(record: AccessibilityRecord!, maxScrollY: Int)

Sets the max scroll offset of the source top edge in pixels.

open Unit
setParcelableData(parcelableData: Parcelable!)

Sets the Parcelable data of the event.

open Unit
setPassword(isPassword: Boolean)

Sets if the source is a password field.

open Unit
setRemovedCount(removedCount: Int)

Sets the number of removed characters.

open Unit
setScrollX(scrollX: Int)

Sets the scroll offset of the source left edge in pixels.

open Unit
setScrollY(scrollY: Int)

Sets the scroll offset of the source top edge in pixels.

open Unit
setScrollable(scrollable: Boolean)

Sets if the source is scrollable.

open Unit
setSource(source: View!)

Sets the event source.

open Unit
setSource(root: View!, virtualDescendantId: Int)

Sets the source to be a virtual descendant of the given root.

open static Unit
setSource(@NonNull record: AccessibilityRecord, root: View!, virtualDescendantId: Int)

Sets the source to be a virtual descendant of the given root.

open Unit
setToIndex(toIndex: Int)

Sets the index of text selection end or the index of the last visible item when scrolling.

Public constructors

<init>

AccessibilityRecordCompat(record: Any!)

Deprecated: This is not type safe. If you want to modify an AccessibilityEvent's properties defined in android.view.accessibility.AccessibilityRecord use AccessibilityEventCompat#asRecord(AccessibilityEvent). This method will be removed in a subsequent release of the support library.

Public methods

equals

open fun equals(other: Any?): Boolean

Deprecated: Use AccessibilityRecord directly.

getAddedCount

open fun getAddedCount(): Int

Deprecated: Use AccessibilityRecord#getAddedCount() directly.

Gets the number of added characters.

Return
Int The number of added characters.

getBeforeText

open fun getBeforeText(): CharSequence!

Deprecated: Use AccessibilityRecord#getBeforeText() directly.

Sets the text before a change.

Return
CharSequence! The text before the change.

getClassName

open fun getClassName(): CharSequence!

Deprecated: Use AccessibilityRecord#getClassName() directly.

Gets the class name of the source.

Return
CharSequence! The class name.

getContentDescription

open fun getContentDescription(): CharSequence!

Deprecated: Use AccessibilityRecord#getContentDescription() directly.

Gets the description of the source.

Return
CharSequence! The description.

getCurrentItemIndex

open fun getCurrentItemIndex(): Int

Deprecated: Use AccessibilityRecord#getCurrentItemIndex() directly.

Gets the index of the source in the list of items the can be visited.

Return
Int The current item index.

getFromIndex

open fun getFromIndex(): Int

Deprecated: Use AccessibilityRecord#getFromIndex() directly.

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.

Return
Int The index of the first character or selection start or the first visible item.

getImpl

open fun getImpl(): Any!

Deprecated: This method will be removed in a subsequent release of the support library.

Return
Any! The wrapped implementation.

getItemCount

open fun getItemCount(): Int

Deprecated: Use AccessibilityRecord#getItemCount() directly.

Gets the number of items that can be visited.

Return
Int The number of items.

getMaxScrollX

open fun getMaxScrollX(): Int

Deprecated: Use getMaxScrollX(AccessibilityRecord) instead.

Gets the max scroll offset of the source left edge in pixels.

Return
Int The max scroll.

getMaxScrollX

open static fun getMaxScrollX(record: AccessibilityRecord!): Int

Gets the max scroll offset of the source left edge in pixels.

Parameters
record AccessibilityRecord!: The AccessibilityRecord instance to use.
Return
Int The max scroll.

getMaxScrollY

open fun getMaxScrollY(): Int

Deprecated: Use getMaxScrollY(AccessibilityRecord) instead.

Gets the max scroll offset of the source top edge in pixels.

Return
Int The max scroll.

getMaxScrollY

open static fun getMaxScrollY(record: AccessibilityRecord!): Int

Gets the max scroll offset of the source top edge in pixels.

Parameters
record AccessibilityRecord!: The AccessibilityRecord instance to use.
Return
Int The max scroll.

getParcelableData

open fun getParcelableData(): Parcelable!

Deprecated: Use AccessibilityRecord#getParcelableData() directly.

Gets the Parcelable data.

Return
Parcelable! The parcelable data.

getRemovedCount

open fun getRemovedCount(): Int

Deprecated: Use AccessibilityRecord#getRemovedCount() directly.

Gets the number of removed characters.

Return
Int The number of removed characters.

getScrollX

open fun getScrollX(): Int

Deprecated: Use AccessibilityRecord#getScrollX() directly.

Gets the scroll offset of the source left edge in pixels.

Return
Int The scroll.

getScrollY

open fun getScrollY(): Int

Deprecated: Use AccessibilityRecord#getScrollY() directly.

Gets the scroll offset of the source top edge in pixels.

Return
Int The scroll.

getSource

open fun getSource(): AccessibilityNodeInfoCompat!

Deprecated: Use AccessibilityRecord#getSource() directly.

Gets the android.view.accessibility.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.

Return
AccessibilityNodeInfoCompat! The info of the source.

getText

open fun getText(): MutableList<CharSequence!>!

Deprecated: Use AccessibilityRecord#getText() directly.

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.

Return
MutableList<CharSequence!>! The text.

getToIndex

open fun getToIndex(): Int

Deprecated: Use AccessibilityRecord#getToIndex() directly.

Gets the index of text selection end or the index of the last visible item when scrolling.

Return
Int The index of selection end or last item index.

getWindowId

open fun getWindowId(): Int

Deprecated: Use AccessibilityRecord#getWindowId() directly.

Gets the id of the window from which the event comes from.

Return
Int The window id.

hashCode

open fun hashCode(): Int

Deprecated: Use AccessibilityRecord#hashCode() directly.

isChecked

open fun isChecked(): Boolean

Deprecated: Use AccessibilityRecord#isChecked() directly.

Gets if the source is checked.

Return
Boolean True if the view is checked, false otherwise.

isEnabled

open fun isEnabled()