WindowInspector
class WindowInspector
kotlin.Any | |
↳ | android.view.inspector.WindowInspector |
Provides access to window inspection information.
Summary
Public methods | |
---|---|
static Unit |
addGlobalWindowViewsListener(executor: Executor, consumer: Consumer<MutableList<View!>!>) Adds a listener that is notified whenever the value of |
static MutableList<View!> | |
static Unit |
removeGlobalWindowViewsListener(consumer: Consumer<MutableList<View!>!>) Removes a listener from getting notifications of global window views changes. |
Public methods
addGlobalWindowViewsListener
static fun addGlobalWindowViewsListener(
executor: Executor,
consumer: Consumer<MutableList<View!>!>
): Unit
Adds a listener that is notified whenever the value of getGlobalWindowViews()
changes. The current value is provided immediately using the provided Executor
. The value is initially relayed using the main thread and then posted to the Executor
. Using a direct Executor
and doing heavy calculations can cause performance issues. If this Consumer
is already registered, then this method is a no op.
Parameters | |
---|---|
executor |
Executor: This value cannot be null . |
consumer |
Consumer<MutableList<View!>!>: This value cannot be null . |
See Also
getGlobalWindowViews
static fun getGlobalWindowViews(): MutableList<View!>
Return | |
---|---|
MutableList<View!> |
the list of all window views attached to the current process This value cannot be null . |
removeGlobalWindowViewsListener
static fun removeGlobalWindowViewsListener(consumer: Consumer<MutableList<View!>!>): Unit
Removes a listener from getting notifications of global window views changes. If the Consumer
is not registered this method is a no op.
Parameters | |
---|---|
consumer |
Consumer<MutableList<View!>!>: This value cannot be null . |