Package org.robolectric.android.internal
Class LocalUiController
java.lang.Object
org.robolectric.android.internal.LocalUiController
- All Implemented Interfaces:
androidx.test.platform.ui.UiController
public class LocalUiController extends Object implements androidx.test.platform.ui.UiController
A
UiController
that runs on a local JVM with Robolectric.-
Constructor Summary
Constructors Constructor Description LocalUiController()
-
Method Summary
Modifier and Type Method Description boolean
injectKeyEvent(KeyEvent event)
boolean
injectMotionEvent(MotionEvent event)
boolean
injectString(String str)
void
loopMainThreadForAtLeast(long millisDelay)
void
loopMainThreadUntilIdle()
-
Constructor Details
-
LocalUiController
public LocalUiController()
-
-
Method Details
-
injectMotionEvent
public boolean injectMotionEvent(MotionEvent event) throws androidx.test.platform.ui.InjectEventSecurityException- Specified by:
injectMotionEvent
in interfaceandroidx.test.platform.ui.UiController
- Throws:
androidx.test.platform.ui.InjectEventSecurityException
-
injectKeyEvent
public boolean injectKeyEvent(KeyEvent event) throws androidx.test.platform.ui.InjectEventSecurityException- Specified by:
injectKeyEvent
in interfaceandroidx.test.platform.ui.UiController
- Throws:
androidx.test.platform.ui.InjectEventSecurityException
-
injectString
public boolean injectString(String str) throws androidx.test.platform.ui.InjectEventSecurityException- Specified by:
injectString
in interfaceandroidx.test.platform.ui.UiController
- Throws:
androidx.test.platform.ui.InjectEventSecurityException
-
loopMainThreadUntilIdle
public void loopMainThreadUntilIdle()- Specified by:
loopMainThreadUntilIdle
in interfaceandroidx.test.platform.ui.UiController
-
loopMainThreadForAtLeast
public void loopMainThreadForAtLeast(long millisDelay)- Specified by:
loopMainThreadForAtLeast
in interfaceandroidx.test.platform.ui.UiController
-