Class ShadowInputMethodManager

    • Constructor Detail

      • ShadowInputMethodManager

        public ShadowInputMethodManager()
    • Method Detail

      • showSoftInput

        @Implementation
        protected boolean showSoftInput​(View view,
                                        int flags)
      • showSoftInput

        @Implementation(maxSdk=30)
        protected boolean showSoftInput​(View view,
                                        int flags,
                                        ResultReceiver resultReceiver)
      • showSoftInput

        @Implementation(minSdk=31)
        protected boolean showSoftInput​(View view,
                                        int flags,
                                        ResultReceiver resultReceiver,
                                        int ignoredReason)
      • hideSoftInputFromWindow

        @Implementation(minSdk=31)
        protected boolean hideSoftInputFromWindow​(IBinder windowToken,
                                                  int flags,
                                                  ResultReceiver resultReceiver,
                                                  int ignoredReason)
      • hideSoftInputFromWindow

        @Implementation(maxSdk=30)
        protected boolean hideSoftInputFromWindow​(IBinder windowToken,
                                                  int flags)
      • hideSoftInputFromWindow

        @Implementation
        protected boolean hideSoftInputFromWindow​(IBinder windowToken,
                                                  int flags,
                                                  ResultReceiver resultReceiver)
      • toggleSoftInput

        @Implementation
        protected void toggleSoftInput​(int showFlags,
                                       int hideFlags)
      • isSoftInputVisible

        public boolean isSoftInputVisible()
      • closeCurrentInput

        @Implementation(minSdk=31)
        protected void closeCurrentInput()
        The framework implementation does a blocking call to system server. This will deadlock on Robolectric, so just stub out the method.
      • restartInput

        @Implementation
        protected void restartInput​(View view)
      • isActive

        @Implementation
        protected boolean isActive​(View view)
      • isActive

        @Implementation
        protected boolean isActive()
      • isFullscreenMode

        @Implementation
        protected boolean isFullscreenMode()
      • focusIn

        @Implementation(maxSdk=29)
        protected void focusIn​(View view)
      • onViewDetachedFromWindow

        @Implementation(minSdk=23,
                        maxSdk=29)
        protected void onViewDetachedFromWindow​(View view)
      • displayCompletions

        @Implementation
        protected void displayCompletions​(View view,
                                          CompletionInfo[] completions)
      • peekInstance

        @Implementation(maxSdk=22)
        protected static InputMethodManager peekInstance()
      • startInputInner

        @Implementation(minSdk=24)
        protected boolean startInputInner​(int startInputReason,
                                          IBinder windowGainingFocus,
                                          int startInputFlags,
                                          int softInputMode,
                                          int windowFlags)
      • sendAppPrivateCommand

        @Implementation(minSdk=23)
        protected void sendAppPrivateCommand​(View view,
                                             String action,
                                             Bundle data)
      • reset

        @Resetter
        public static void reset()