By.Window
public class By.Window
This nested class is used to create a ByWindowSelector that matches a window.
Summary
Public methods |
|
|---|---|
static @NonNull ByWindowSelector |
active(boolean isActive)Constructs a new |
static @NonNull ByWindowSelector |
@RequiresApi(value = 30)Constructs a new |
static @NonNull ByWindowSelector |
focused(boolean isFocused)Constructs a new |
static @NonNull ByWindowSelector |
id(int id)Constructs a new |
static @NonNull ByWindowSelector |
Constructs a new |
static @NonNull ByWindowSelector |
layerAbove(@IntRange(from = 0) int referenceLayer)Constructs a new |
static @NonNull ByWindowSelector |
layerBelow(@IntRange(from = 1) int referenceLayer)Constructs a new |
static @NonNull ByWindowSelector |
Constructs a new |
static @NonNull ByWindowSelector |
Constructs a new |
static @NonNull ByWindowSelector |
Constructs a new |
static @NonNull ByWindowSelector |
Constructs a new |
static @NonNull ByWindowSelector |
titleContains(@NonNull String substring)Constructs a new |
static @NonNull ByWindowSelector |
titleEndsWith(@NonNull String suffix)Constructs a new |
static @NonNull ByWindowSelector |
titleStartsWith(@NonNull String prefix)Constructs a new |
static @NonNull ByWindowSelector |
type(int type)Constructs a new |
Public methods
active
public static @NonNull ByWindowSelector active(boolean isActive)
Constructs a new ByWindowSelector and sets the active criteria.
| See also | |
|---|---|
active |
ByWindowSelector.active(boolean) |
displayId
@RequiresApi(value = 30)
public static @NonNull ByWindowSelector displayId(int displayId)
Constructs a new ByWindowSelector and sets the display ID criteria.
| See also | |
|---|---|
displayId |
ByWindowSelector.displayId(int) |
focused
public static @NonNull ByWindowSelector focused(boolean isFocused)
Constructs a new ByWindowSelector and sets the focused criteria.
| See also | |
|---|---|
focused |
ByWindowSelector.focused(boolean) |
id
public static @NonNull ByWindowSelector id(int id)
Constructs a new ByWindowSelector and sets the window id criteria.
The window id can be obtained from getId.
| See also | |
|---|---|
id |
ByWindowSelector.id(int) |
layer
public static @NonNull ByWindowSelector layer(@IntRange(from = 0) int layer)
Constructs a new ByWindowSelector and sets the layer (Z-order) criteria.
The layer ID can be obtained from getLayer.
| See also | |
|---|---|
layer |
ByWindowSelector.layer(int) |
layerAbove
public static @NonNull ByWindowSelector layerAbove(@IntRange(from = 0) int referenceLayer)
Constructs a new ByWindowSelector and sets the layer (Z-order) criteria.
The referenced layer ID can be obtained from getLayer.
| See also | |
|---|---|
layerAbove |
ByWindowSelector.layerAbove(int) |
layerBelow
public static @NonNull ByWindowSelector layerBelow(@IntRange(from = 1) int referenceLayer)
Constructs a new ByWindowSelector and sets the layer (Z-order) criteria.
The referenced layer ID can be obtained from getLayer.
| See also | |
|---|---|
layerBelow |
ByWindowSelector.layerBelow(int) |
pkg
public static @NonNull ByWindowSelector pkg(@NonNull String packageName)
Constructs a new ByWindowSelector and sets the package criteria.
| See also | |
|---|---|
pkg |
ByWindowSelector.pkg(String) |
pkg
public static @NonNull ByWindowSelector pkg(@NonNull Pattern regex)
Constructs a new ByWindowSelector and sets the package criteria.
| See also | |
|---|---|
pkg |
ByWindowSelector.pkg(Pattern) |
title
public static @NonNull ByWindowSelector title(@NonNull Pattern regex)
Constructs a new ByWindowSelector and sets the title criteria.
| See also | |
|---|---|
title |
ByWindowSelector.title(Pattern) |
title
public static @NonNull ByWindowSelector title(@NonNull String title)
Constructs a new ByWindowSelector and sets the title criteria.
| See also | |
|---|---|
title |
ByWindowSelector.title(String) |
titleContains
public static @NonNull ByWindowSelector titleContains(@NonNull String substring)
Constructs a new ByWindowSelector and sets the title criteria.
| See also | |
|---|---|
titleContains |
ByWindowSelector.titleContains(String) |
titleEndsWith
public static @NonNull ByWindowSelector titleEndsWith(@NonNull String suffix)
Constructs a new ByWindowSelector and sets the title criteria.
| See also | |
|---|---|
titleEndsWith |
ByWindowSelector.titleEndsWith(String) |
titleStartsWith
public static @NonNull ByWindowSelector titleStartsWith(@NonNull String prefix)
Constructs a new ByWindowSelector and sets the title criteria.
| See also | |
|---|---|
titleStartsWith |
ByWindowSelector.titleStartsWith(String) |
type
public static @NonNull ByWindowSelector type(int type)
Constructs a new ByWindowSelector and sets the type criteria.
| See also | |
|---|---|
type |
ByWindowSelector.type(int) |