Class ShadowUiAutomation

java.lang.Object
org.robolectric.shadows.ShadowUiAutomation

@Implements(android.app.UiAutomation.class) public class ShadowUiAutomation extends Object
Shadow for UiAutomation.
  • Constructor Details

    • ShadowUiAutomation

      public ShadowUiAutomation()
  • Method Details

    • setAnimationScaleCompat

      public static void setAnimationScaleCompat(float scale)
      Sets the animation scale, see UiAutomation.setAnimationScale(float). Provides backwards compatible access to SDKs invalid input: '<' T.
    • setAnimationScale

      @Implementation(minSdk=33) protected void setAnimationScale(float scale)
    • setRotation

      @Implementation protected boolean setRotation(int rotation)
    • throwIfNotConnectedLocked

      @Implementation protected void throwIfNotConnectedLocked()
    • takeScreenshot

      @Implementation protected Bitmap takeScreenshot() throws Exception
      Throws:
      Exception
    • injectInputEvent

      public static boolean injectInputEvent(InputEvent event)
      Injects a motion event into the appropriate window, see UiAutomation.injectInputEvent(InputEvent, boolean). This can be used through the UiAutomation API, this method is provided for backwards compatibility with SDK invalid input: '<' 18.
    • injectInputEvent

      @Implementation protected boolean injectInputEvent(InputEvent event, boolean sync)