AccessibilityWindowInfoCompat
open class AccessibilityWindowInfoCompat
kotlin.Any | |
↳ | androidx.core.view.accessibility.AccessibilityWindowInfoCompat |
Helper for accessing android.view.accessibility.AccessibilityWindowInfo
.
Summary
Constants | |
---|---|
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: This is an application window. |
static Int |
Window type: This is an input method window. |
static Int |
Window type: A system window used to divide the screen in split-screen mode. |
static Int |
Window type: This is an system window. |
Public methods | |
---|---|
open Boolean | |
open AccessibilityNodeInfoCompat! |
Gets the node that anchors this window to another. |
open Unit |
getBoundsInScreen(outBounds: Rect!) Gets the bounds of this window in the screen. |
open AccessibilityWindowInfoCompat! |
Gets the child window at a given index. |
open Int |
Gets the number of child windows. |
open Int |
getId() Gets the unique window id. |
open Int |
getLayer() Gets the layer which determines the Z-order of the window. |
open AccessibilityWindowInfoCompat! |
Gets the parent window if such. |
open AccessibilityNodeInfoCompat! |
getRoot() Gets the root node in the window's hierarchy. |
open CharSequence! |
getTitle() Gets the title of the window. |
open Int |
getType() Gets the type of the window. |
open Int |
hashCode() |
open Boolean |
Gets if this window has accessibility focus. |
open Boolean |
isActive() Gets if this window is active. |
open Boolean |
Gets if this window has input focus. |
open static AccessibilityWindowInfoCompat! |
obtain() Returns a cached instance if such is available or a new one is created. |
open static AccessibilityWindowInfoCompat! |
obtain(info: AccessibilityWindowInfoCompat!) Returns a cached instance if such is available or a new one is created. |
open Unit |
recycle() Return an instance back to be reused. |
open String |
toString() |
Constants
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_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_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
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
Public methods
getAnchor
open fun getAnchor(): AccessibilityNodeInfoCompat!
Gets the node that anchors this window to another.
Return | |
---|---|
AccessibilityNodeInfoCompat! |
The anchor node, or null if none exists. |
getBoundsInScreen
open fun getBoundsInScreen(outBounds: Rect!): Unit
Gets the bounds of this window in the screen.
Parameters | |
---|---|
outBounds |
Rect!: The out window bounds. |
getChild
open fun getChild(index: Int): AccessibilityWindowInfoCompat!
Gets the child window at a given index.
Parameters | |
---|---|
index |
Int: The index. |
Return | |
---|---|
AccessibilityWindowInfoCompat! |
The child. |
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. |
getParent
open fun getParent(): AccessibilityWindowInfoCompat!
Gets the parent window if such.
Return | |
---|---|
AccessibilityWindowInfoCompat! |
The parent window. |
getRoot
open fun getRoot(): AccessibilityNodeInfoCompat!
Gets the root node in the window's hierarchy.
Return | |
---|---|
AccessibilityNodeInfoCompat! |
The root node. |
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. |
hashCode
open fun hashCode(): Int
isAccessibilityFocused
open fun isAccessibilityFocused(): Boolean
Gets if this window has accessibility focus.
Return | |
---|---|
Boolean |
Whether has accessibility focus. |
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. |
isFocused
open fun isFocused(): Boolean
Gets if this window has input focus.
Return | |
---|---|
Boolean |
Whether has input focus. |
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. |
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. |
toString
@NonNull open fun toString(): String