TextView.IOnEditorActionListener.OnEditorAction Method

Definition

Called when an action is being performed.

[Android.Runtime.Register("onEditorAction", "(Landroid/widget/TextView;ILandroid/view/KeyEvent;)Z", "GetOnEditorAction_Landroid_widget_TextView_ILandroid_view_KeyEvent_Handler:Android.Widget.TextView/IOnEditorActionListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool OnEditorAction (Android.Widget.TextView? v, Android.Views.InputMethods.ImeAction actionId, Android.Views.KeyEvent? e);
[<Android.Runtime.Register("onEditorAction", "(Landroid/widget/TextView;ILandroid/view/KeyEvent;)Z", "GetOnEditorAction_Landroid_widget_TextView_ILandroid_view_KeyEvent_Handler:Android.Widget.TextView/IOnEditorActionListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnEditorAction : Android.Widget.TextView * Android.Views.InputMethods.ImeAction * Android.Views.KeyEvent -> bool

Parameters

v
TextView

The view that was clicked.

actionId
ImeAction

Identifier of the action. This will be either the identifier you supplied, or EditorInfo#IME_NULL EditorInfo.IME_NULL if being called due to the enter key being pressed. Starting from Android 14, the action identifier will also be included when triggered by an enter key if the input is constrained to a single line.

e
KeyEvent

If triggered by an enter key, this is the event; otherwise, this is null.

Returns

Return true if you have consumed the action, else false.

Attributes

Remarks

Called when an action is being performed.

Java documentation for android.widget.TextView.OnEditorActionListener.onEditorAction(android.widget.TextView, int, android.view.KeyEvent).

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.

Applies to