Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
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.