다음을 통해 공유


IInputMethod Interface

Definition

The InputMethod interface represents an input method which can generate key events and text, such as digital, email addresses, CJK characters, other language characters, and etc.

[Android.Runtime.Register("android/view/inputmethod/InputMethod", "", "Android.Views.InputMethods.IInputMethodInvoker")]
public interface IInputMethod : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/view/inputmethod/InputMethod", "", "Android.Views.InputMethods.IInputMethodInvoker")>]
type IInputMethod = interface
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

The InputMethod interface represents an input method which can generate key events and text, such as digital, email addresses, CJK characters, other language characters, and etc., while handling various input events, and send the text back to the application that requests text input. See InputMethodManager for more general information about the architecture.

Applications will not normally use this interface themselves, instead relying on the standard interaction provided by android.widget.TextView and android.widget.EditText.

Those implementing input methods should normally do so by deriving from InputMethodService or one of its subclasses. When implementing an input method, the service component containing it must also supply a #SERVICE_META_DATA meta-data field, referencing an XML resource providing details about the input method. All input methods also must require that clients hold the android.Manifest.permission#BIND_INPUT_METHOD in order to interact with the service; if this is not required, the system will not use that input method, because it can not trust that it is not compromised.

The InputMethod interface is actually split into two parts: the interface here is the top-level interface to the input method, providing all access to it, which only the system can access (due to the BIND_INPUT_METHOD permission requirement). In addition its method #createSession(android.view.inputmethod.InputMethod.SessionCallback) can be called to instantate a secondary InputMethodSession interface which is what clients use to communicate with the input method.

Java documentation for android.view.inputmethod.InputMethod.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Fields

ServiceInterface

This is the interface name that a service implementing an input method should say that it supports -- that is, this is the action it uses for its intent filter.

ServiceMetaData

Name under which an InputMethod service component publishes information about itself.

Properties

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)

Methods

AttachToken(IBinder)

Called first thing after an input method is created, this supplies a unique token for the session it has with the system service.

BindInput(InputBinding)

Bind a new application environment in to the input method, so that it can later start and stop input processing.

ChangeInputMethodSubtype(InputMethodSubtype)

Notify that the input method subtype is being changed in the same input method.

CreateSession(IInputMethodSessionCallback)

Create a new InputMethodSession that can be handed to client applications for interacting with the input method.

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
HideSoftInput(Int32, ResultReceiver)

Request that any soft input part of the input method be hidden from the user.

RestartInput(IInputConnection, EditorInfo)

This method is called when the state of this input method needs to be reset.

RevokeSession(IInputMethodSession)

Disable and destroy a session that was previously created with #createSession(android.view.inputmethod.InputMethod.SessionCallback).

SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
SetSessionEnabled(IInputMethodSession, Boolean)

Control whether a particular input method session is active.

ShowSoftInput(ShowSoftInputFlags, ResultReceiver)

Request that any soft input part of the input method be shown to the user.

StartInput(IInputConnection, EditorInfo)

This method is called when the application starts to receive text and it is ready for this input method to process received events and send result text back to the application.

UnbindInput()

Unbind an application environment, called when the information previously set by #bindInput is no longer valid for this input method.

UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to