{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

Root

public final class Root


Represents a root view in the application and optionally the layout params of the window holding it.

This class is used internally to determine which view root to run user provided matchers against it is not part of the public api.

Summary

Nested types

Root.Builder

Public fields

final View
final EspressoOptional<WindowManager.LayoutParams>

Public constructors

Public methods

View
EspressoOptional<WindowManager.LayoutParams>
boolean

Checks if the Root is ready.

String

Public fields

decorView

public final View decorView

windowLayoutParams

public final EspressoOptional<WindowManager.LayoutParamswindowLayoutParams

Public constructors

Root

public final Root()

Public methods

getDecorView

public View getDecorView()

getWindowLayoutParams

public EspressoOptional<WindowManager.LayoutParamsgetWindowLayoutParams()

isReady

public boolean isReady()

Checks if the Root is ready. The UI is no longer in flux if layout of the root view is not being requested and the root view has window focus or is focusable.

Returns
boolean

if the root view has focus

toString

public String toString()