다음을 통해 공유


UiAutomation.Windows Property

Definition

Gets the windows on the screen associated with the UiAutomation context (usually the android.view.Display#DEFAULT_DISPLAY default display).

        <p>
        This method returns only the windows that a sighted user can interact with, as opposed to
        all windows.

        <p>
        For example, if there is a modal dialog shown and the user cannot touch
        anything behind it, then only the modal window will be reported
        (assuming it is the top one). For convenience the returned windows
        are ordered in a descending layer order, which is the windows that
        are higher in the Z-order are reported first.
        <p>
        <strong>Note:</strong> In order to access the windows you have to opt-in
        to retrieve the interactive windows by setting the
        {@link AccessibilityServiceInfo#FLAG_RETRIEVE_INTERACTIVE_WINDOWS</code> flag.
public System.Collections.Generic.IList<Android.Views.Accessibility.AccessibilityWindowInfo>? Windows { [Android.Runtime.Register("getWindows", "()Ljava/util/List;", "")] get; }
[<get: Android.Runtime.Register("getWindows", "()Ljava/util/List;", "")>]
member this.Windows : System.Collections.Generic.IList<Android.Views.Accessibility.AccessibilityWindowInfo>

Property Value

The windows if there are windows such, otherwise an empty list.

Attributes

Remarks

Gets the windows on the screen associated with the UiAutomation context (usually the android.view.Display#DEFAULT_DISPLAY default display).

<p> This method returns only the windows that a sighted user can interact with, as opposed to all windows.

<p> For example, if there is a modal dialog shown and the user cannot touch anything behind it, then only the modal window will be reported (assuming it is the top one). For convenience the returned windows are ordered in a descending layer order, which is the windows that are higher in the Z-order are reported first. <p> <strong>Note:</strong> In order to access the windows you have to opt-in to retrieve the interactive windows by setting the {@link AccessibilityServiceInfo#FLAG_RETRIEVE_INTERACTIVE_WINDOWS flag.

Java documentation for android.app.UiAutomation.getWindows().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to