Stay organized with collections
Save and categorize content based on your preferences.
@Qualifier
@Retention(value = RetentionPolicy.RUNTIME)
public annotation MainThread
Annotates an Executor that executes tasks on the main thread
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-07-17 UTC.
[null,null,["Last updated 2025-07-17 UTC."],[],[],null,["# MainThread\n==========\n\nArtifact: [androidx.test.espresso:espresso-core](/jetpack/androidx/releases/test-espresso) \n[View Source](https://cs.android.com/search?q=file:androidx/test/espresso/base/MainThread.java+class:androidx.test.espresso.base.MainThread)\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/androidx/test/espresso/base/MainThread \"View this page in Kotlin\") \\|Java\n\n\n```\n@Qualifier\n@Retention(value = RetentionPolicy.RUNTIME)\npublic annotation MainThread\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nAnnotates an Executor that executes tasks on the main thread"]]