I want to execute some code in my instrumentation test after my Activity's onCreate
but before its onResume
. Is there any way I can achieve this in the test code, without modifying production code?
My test class extends ActivityInstrumentationTestCase2
. It's a gradle project running under the latest Android Studio.
I want to execute some code in my instrumentation test after my Activity's onCreate but before its onResume.
Try onStart()
:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.