Class TextInputPlugin


  • public class TextInputPlugin
    extends Object
    Android implementation of the text input plugin.
    • Method Detail

      • lockPlatformViewInputConnection

        public void lockPlatformViewInputConnection()
        Use the current platform view input connection until unlockPlatformViewInputConnection is called.

        The current input connection instance is cached and any following call to @{link createInputConnection} returns the cached connection until unlockPlatformViewInputConnection is called.

        This is a no-op if the current input target isn't a platform view.

        This is used to preserve an input connection when moving a platform view from one virtual display to another.

      • unlockPlatformViewInputConnection

        public void unlockPlatformViewInputConnection()
        Unlocks the input connection.

        See also: @{link lockPlatformViewInputConnection}.

      • destroy

        public void destroy()
        Detaches the text input plugin from the platform views controller.

        The TextInputPlugin instance should not be used after calling this.

      • getLastInputConnection

        @Nullable
        public InputConnection getLastInputConnection()
      • clearPlatformViewClient

        public void clearPlatformViewClient​(int platformViewId)
        Clears a platform view text input client if it is the current input target.

        This is called when a platform view is disposed to make sure we're not hanging to a stale input connection.

      • sendTextInputAppPrivateCommand

        public void sendTextInputAppPrivateCommand​(@NonNull
                                                   String action,
                                                   @NonNull
                                                   Bundle data)
      • handleKeyEvent

        public boolean handleKeyEvent​(@NonNull
                                      KeyEvent keyEvent)
      • didChangeEditingState

        public void didChangeEditingState​(boolean textChanged,
                                          boolean selectionChanged,
                                          boolean composingRegionChanged)
      • onProvideAutofillVirtualStructure

        public void onProvideAutofillVirtualStructure​(@NonNull
                                                      ViewStructure structure,
                                                      int flags)