Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# ActiveRootLister\n================\n\n| This package is part of the Android [support library](/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](/jetpack/androidx) which is part of [Jetpack](/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class\n| mappings](/jetpack/androidx/migrate/class-mappings).\n\n\n`\npublic\n\n\ninterface\nActiveRootLister\n`\n\n\n`\n\n\n`\n\n|-----------------------------------------------------|\n| android.support.test.espresso.base.ActiveRootLister |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nProvides access to all root views in an application.\n\nSummary\n-------\n\n| ### Public methods ||\n|--------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[List](https://developer.android.com/reference/java/util/List.html)`\u003c`[Root](/reference/android/support/test/espresso/Root)`\u003e` | ` `[listActiveRoots](/reference/android/support/test/espresso/base/ActiveRootLister#listActiveRoots())`() ` Lists the active roots in an application at this moment. |\n\nPublic methods\n--------------\n\n### listActiveRoots\n\n```\nList\u003cRoot\u003e listActiveRoots ()\n```\n\nLists the active roots in an application at this moment.\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------|\n| [List](https://developer.android.com/reference/java/util/List.html)`\u003c`[Root](/reference/android/support/test/espresso/Root)`\u003e` | a list of all the active roots in the application. \u003cbr /\u003e |\n\n| Throws ||\n|-------------------------------------------------------------------------------------------------------|---------------------------------------------------|\n| [IllegalStateException](https://developer.android.com/reference/java/lang/IllegalStateException.html) | if invoked from a thread besides the main thread. |\n\n-\n\n Annotations\n -----------\n\n - [Default](/reference/android/support/test/espresso/base/Default)\n - [MainThread](/reference/android/support/test/espresso/base/MainThread)\n - [RootViewPickerScope](/reference/android/support/test/espresso/base/RootViewPickerScope)\n-\n\n Interfaces\n ----------\n\n - [ActiveRootLister](/reference/android/support/test/espresso/base/ActiveRootLister)\n - [IdlingUiController](/reference/android/support/test/espresso/base/IdlingUiController)\n - [InterruptableUiController](/reference/android/support/test/espresso/base/InterruptableUiController)\n-\n\n Classes\n -------\n\n - [DefaultFailureHandler](/reference/android/support/test/espresso/base/DefaultFailureHandler)\n - [IdlingResourceRegistry](/reference/android/support/test/espresso/base/IdlingResourceRegistry)\n - [RootViewPicker](/reference/android/support/test/espresso/base/RootViewPicker)\n - [ViewFinderImpl](/reference/android/support/test/espresso/base/ViewFinderImpl)"]]