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 ByWindowSelector and sets the active criteria.

static @NonNull ByWindowSelector
@RequiresApi(value = 30)
displayId(int displayId)

Constructs a new ByWindowSelector and sets the display ID criteria.

static @NonNull ByWindowSelector
focused(boolean isFocused)

Constructs a new ByWindowSelector and sets the focused criteria.

static @NonNull ByWindowSelector
id(int id)

Constructs a new ByWindowSelector and sets the window id criteria.

static @NonNull ByWindowSelector
layer(@IntRange(from = 0) int layer)

Constructs a new ByWindowSelector and sets the layer (Z-order) criteria.

static @NonNull ByWindowSelector
layerAbove(@IntRange(from = 0) int referenceLayer)

Constructs a new ByWindowSelector and sets the layer (Z-order) criteria.

static @NonNull ByWindowSelector
layerBelow(@IntRange(from = 1) int referenceLayer)

Constructs a new ByWindowSelector and sets the layer (Z-order) criteria.

static @NonNull ByWindowSelector
pkg(@NonNull String packageName)

Constructs a new ByWindowSelector and sets the package criteria.

static @NonNull ByWindowSelector

Constructs a new ByWindowSelector and sets the package criteria.

static @NonNull ByWindowSelector

Constructs a new ByWindowSelector and sets the title criteria.

static @NonNull ByWindowSelector

Constructs a new ByWindowSelector and sets the title criteria.

static @NonNull ByWindowSelector

Constructs a new ByWindowSelector and sets the title criteria.

static @NonNull ByWindowSelector

Constructs a new ByWindowSelector and sets the title criteria.

static @NonNull ByWindowSelector

Constructs a new ByWindowSelector and sets the title criteria.

static @NonNull ByWindowSelector
type(int type)

Constructs a new ByWindowSelector and sets the type criteria.

Public methods

active

Added in 2.4.0-alpha06
public static @NonNull ByWindowSelector active(boolean isActive)

Constructs a new ByWindowSelector and sets the active criteria.

See also
active

ByWindowSelector.active(boolean)

displayId

Added in 2.4.0-alpha06
@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

Added in 2.4.0-alpha06
public static @NonNull ByWindowSelector focused(boolean isFocused)

Constructs a new ByWindowSelector and sets the focused criteria.

See also
focused

ByWindowSelector.focused(boolean)

id

Added in 2.4.0-alpha06
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

Added in 2.4.0-alpha06
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

Added in 2.4.0-alpha06
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

Added in 2.4.0-alpha06
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

Added in 2.4.0-alpha06
public static @NonNull ByWindowSelector pkg(@NonNull String packageName)

Constructs a new ByWindowSelector and sets the package criteria.

See also
pkg

ByWindowSelector.pkg(String)

pkg

Added in 2.4.0-alpha06
public static @NonNull ByWindowSelector pkg(@NonNull Pattern regex)

Constructs a new ByWindowSelector and sets the package criteria.

See also
pkg

ByWindowSelector.pkg(Pattern)

title

Added in 2.4.0-alpha06
public static @NonNull ByWindowSelector title(@NonNull Pattern regex)

Constructs a new ByWindowSelector and sets the title criteria.

See also
title

ByWindowSelector.title(Pattern)

title

Added in 2.4.0-alpha06
public static @NonNull ByWindowSelector title(@NonNull String title)

Constructs a new ByWindowSelector and sets the title criteria.

See also
title

ByWindowSelector.title(String)

titleContains

Added in 2.4.0-alpha06
public static @NonNull ByWindowSelector titleContains(@NonNull String substring)

Constructs a new ByWindowSelector and sets the title criteria.

See also
titleContains

ByWindowSelector.titleContains(String)

titleEndsWith

Added in 2.4.0-alpha06
public static @NonNull ByWindowSelector titleEndsWith(@NonNull String suffix)

Constructs a new ByWindowSelector and sets the title criteria.

See also
titleEndsWith

ByWindowSelector.titleEndsWith(String)

titleStartsWith

Added in 2.4.0-alpha06
public static @NonNull ByWindowSelector titleStartsWith(@NonNull String prefix)

Constructs a new ByWindowSelector and sets the title criteria.

See also
titleStartsWith

ByWindowSelector.titleStartsWith(String)

type

Added in 2.4.0-alpha06
public static @NonNull ByWindowSelector type(int type)

Constructs a new ByWindowSelector and sets the type criteria.

See also
type

ByWindowSelector.type(int)