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

ActiveRootLister

interface ActiveRootLister


Provides access to all root views in an application.

Summary

Public functions

(Mutable)List<Root!>!

Lists the active roots in an application at this moment.

Public functions

listActiveRoots

fun listActiveRoots(): (Mutable)List<Root!>!

Lists the active roots in an application at this moment.

Returns
(Mutable)List<Root!>!

a list of all the active roots in the application.

Throws
java.lang.IllegalStateException: java.lang.IllegalStateException

if invoked from a thread besides the main thread.