Android APIs
Added in API level 3
public static interface

TextView.OnEditorActionListener

android.widget.TextView.OnEditorActionListener

Class Overview

Interface definition for a callback to be invoked when an action is performed on the editor.

Summary

Public Methods
abstract boolean onEditorAction(TextView v, int actionId, KeyEvent event)
Called when an action is being performed.

Public Methods

public abstract boolean onEditorAction (TextView v, int actionId, KeyEvent event)

Added in API level 3

Called when an action is being performed.

Parameters
v The view that was clicked.
actionId Identifier of the action. This will be either the identifier you supplied, or EditorInfo.IME_NULL if being called due to the enter key being pressed.
event 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.