AccessibilityWindowInfoCompat

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

Helper for accessing android.view.accessibility.AccessibilityWindowInfo.

Summary

Constants
static Int

Window type: This is an application window.

static Int

Window type: This is an input method window.

static Int

Window type: This is an system window.

static Int

Window type: Windows that are overlaid only by an for interception of user interactions without changing the windows an accessibility service can introspect.

static Int

Window type: A system window used to divide the screen in split-screen mode.

Public methods
open Unit
getBoundsInScreen(outBounds: Rect!)

Gets the bounds of this window in the screen.

open Boolean

Gets if this window is active.

open Int

open AccessibilityWindowInfoCompat!

Gets the parent window if such.

open Boolean
equals(other: Any?)

open String

open Int

Gets the unique window id.

open Int

Gets the type of the window.

open Boolean

Gets if this window has input focus.

open AccessibilityWindowInfoCompat!
getChild(index: Int)

Gets the child window at a given index.

open Unit

Return an instance back to be reused.

open AccessibilityNodeInfoCompat!

Gets the root node in the window's hierarchy.

open Boolean

Gets if this window has accessibility focus.

open Int

Gets the number of child windows.

open Int

Gets the layer which determines the Z-order of the window.

open AccessibilityNodeInfoCompat!

Gets the node that anchors this window to another.

open CharSequence!

Gets the title of the window.

open static AccessibilityWindowInfoCompat!

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

open static AccessibilityWindowInfoCompat!

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

Constants

TYPE_APPLICATION

static val TYPE_APPLICATION: Int

Window type: This is an application window. Such a window shows UI for interacting with an application.

Value: 1

TYPE_INPUT_METHOD

static val TYPE_INPUT_METHOD: Int

Window type: This is an input method window. Such a window shows UI for inputting text such as keyboard, suggestions, etc.

Value: 2

TYPE_SYSTEM

static val TYPE_SYSTEM: Int

Window type: This is an system window. Such a window shows UI for interacting with the system.

Value: 3

TYPE_ACCESSIBILITY_OVERLAY

static val TYPE_ACCESSIBILITY_OVERLAY: Int

Window type: Windows that are overlaid only by an for interception of user interactions without changing the windows an accessibility service can introspect. In particular, an accessibility service can introspect only windows that a sighted user can interact with which they can touch these windows or can type into these windows. For example, if there is a full screen accessibility overlay that is touchable, the windows below it will be introspectable by an accessibility service regardless they are covered by a touchable window.

Value: 4

TYPE_SPLIT_SCREEN_DIVIDER

static val TYPE_SPLIT_SCREEN_DIVIDER: Int

Window type: A system window used to divide the screen in split-screen mode. This type of window is present only in split-screen mode.

Value: 5

Public methods

getBoundsInScreen

open fun getBoundsInScreen(outBounds: Rect!): Unit

Gets the bounds of this window in the screen.

Parameters
outBounds Rect!: The out window bounds.

isActive

open fun isActive(): Boolean

Gets if this window is active. An active window is the one the user is currently touching or the window has input focus and the user is not touching any window.

Return
Boolean: Whether this is the active window.

hashCode

open fun hashCode(): Int

getParent

open fun getParent(): AccessibilityWindowInfoCompat!

Gets the parent window if such.

Return
AccessibilityWindowInfoCompat!: The parent window.

equals

open fun equals(other: Any?): Boolean

toString

open fun toString(): String

getId

open fun getId(): Int

Gets the unique window id.

Return
Int: windowId The window id.

getType

open fun getType(): Int

Gets the type of the window.

Return
Int: The type.

isFocused

open fun isFocused(): Boolean

Gets if this window has input focus.

Return
Boolean: Whether has input focus.

getChild

open fun getChild(index: Int): AccessibilityWindowInfoCompat!

Gets the child window at a given index.

Parameters
index Int: The index.
Return
AccessibilityWindowInfoCompat!: The child.

recycle

open fun recycle(): Unit

Return an instance back to be reused.

Note: You must not touch the object after calling this function.

Exceptions
IllegalStateException If the info is already recycled.

getRoot

open fun getRoot(): AccessibilityNodeInfoCompat!

Gets the root node in the window's hierarchy.

Return
AccessibilityNodeInfoCompat!: The root node.

isAccessibilityFocused

open fun isAccessibilityFocused(): Boolean

Gets if this window has accessibility focus.

Return
Boolean: Whether has accessibility focus.

getChildCount

open fun getChildCount(): Int

Gets the number of child windows.

Return
Int: The child count.

getLayer

open fun getLayer(): Int

Gets the layer which determines the Z-order of the window. Windows with greater layer appear on top of windows with lesser layer.

Return
Int: The window layer.

getAnchor

open fun getAnchor(): AccessibilityNodeInfoCompat!

Gets the node that anchors this window to another.

Return
AccessibilityNodeInfoCompat!: The anchor node, or null if none exists.

getTitle

open fun getTitle(): CharSequence!

Gets the title of the window.

Return
CharSequence!: The title of the window, or the application label for the window if no title was explicitly set, or null if neither is available.

obtain

open static fun obtain(): AccessibilityWindowInfoCompat!

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

Return
AccessibilityWindowInfoCompat!: An instance.

obtain

open static fun obtain(info: AccessibilityWindowInfoCompat!): AccessibilityWindowInfoCompat!

Returns a cached instance if such is available or a new one is created. The returned instance is initialized from the given info.

Parameters
info AccessibilityWindowInfoCompat!: The other info.
Return
AccessibilityWindowInfoCompat!: An instance.