runOnMainAndDrawSync
open fun runOnMainAndDrawSync(@NonNull activityTestRule: ActivityTestRule, @NonNull view: @NonNull View, @Nullable runner: @Nullable Runnable)(source)
Runs the specified Runnable on the main thread and ensures that the specified View's tree is drawn before returning.
Parameters
activityTestRule
the activity test rule used to run the test
view
the view whose tree should be drawn before returning
runner
the runnable to run on the main thread, or null
to simply force invalidation and a draw pass