Share via


IKeyListener Interface

Definition

Interface for converting text key events into edit operations on an Editable class.

[Android.Runtime.Register("android/text/method/KeyListener", "", "Android.Text.Method.IKeyListenerInvoker")]
public interface IKeyListener : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/text/method/KeyListener", "", "Android.Text.Method.IKeyListenerInvoker")>]
type IKeyListener = interface
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

Interface for converting text key events into edit operations on an Editable class. Note that for most cases this interface has been superceded by general soft input methods as defined by android.view.inputmethod.InputMethod; it should only be used for cases where an application has its own on-screen keypad and also wants to process hard keyboard events to match it.

Key presses on soft input methods are not required to trigger the methods in this listener, and are in fact discouraged to do so. The default android keyboard will not trigger these for any key to any application targetting Jelly Bean or later, and will only deliver it for some key presses to applications targetting Ice Cream Sandwich or earlier.

Java documentation for android.text.method.KeyListener.

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.

Properties

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
InputType

Return the type of text that this key listener is manipulating, as per IInputType.

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

ClearMetaKeyState(View, IEditable, MetaKeyStates)

Remove the given shift states from the edited text.

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)
OnKeyDown(View, IEditable, Keycode, KeyEvent)

If the key listener wants to handle this key, return true, otherwise return false and the caller (i.

OnKeyOther(View, IEditable, KeyEvent)

If the key listener wants to other kinds of key events, return true, otherwise return false and the caller (i.

OnKeyUp(View, IEditable, Keycode, KeyEvent)

If the key listener wants to handle this key release, return true, otherwise return false and the caller (i.

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)
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