to top
Android APIs
public class

MultiTapKeyListener

extends BaseKeyListener
implements SpanWatcher
java.lang.Object
   ↳ android.text.method.MetaKeyKeyListener
     ↳ android.text.method.BaseKeyListener
       ↳ android.text.method.MultiTapKeyListener

Class Overview

This is the standard key listener for alphabetic input on 12-key keyboards. You should generally not need to instantiate this yourself; TextKeyListener will do it for you.

As for all implementations of KeyListener, this class is only concerned with hardware keyboards. Software input methods have no obligation to trigger the methods in this class.

Summary

[Expand]
Inherited Constants
From class android.text.method.MetaKeyKeyListener
Public Constructors

? Examples
MultiTapKeyListener( TextKeyListener.Capitalize cap, boolean autotext)
Public Methods

? Examples
int getInputType()

? Examples
static MultiTapKeyListener getInstance(boolean autotext, TextKeyListener.Capitalize cap)
Returns a new or existing instance with the specified capitalization and correction properties.

? Examples
boolean onKeyDown( View view, Editable content, int keyCode, KeyEvent event)
Handles presses of the meta keys.

? Examples
void onSpanAdded( Spannable s, Object what, int start, int end)
This method is called to notify you that the specified object has been attached to the specified range of the text.

? Examples
void onSpanChanged( Spannable buf, Object what, int s, int e, int start, int stop)
This method is called to notify you that the specified object has been relocated from the range ostart…oend to the new range nstart…nend of the text.

? Examples
void onSpanRemoved( Spannable s, Object what, int start, int end)
This method is called to notify you that the specified object has been detached from the specified range of the text.
[Expand]
Inherited Methods
From class android.text.method.BaseKeyListener
From class android.text.method.MetaKeyKeyListener
From class java.lang.Object
From interface android.text.SpanWatcher
From interface android.text.method.KeyListener

Public Constructors

public MultiTapKeyListener (TextKeyListener.Capitalize cap, boolean autotext)

Added in API level 1

Public Methods

public int getInputType ()

Added in API level 3

public static MultiTapKeyListener getInstance (boolean autotext, TextKeyListener.Capitalize cap)

Added in API level 1

Returns a new or existing instance with the specified capitalization and correction properties.

public boolean onKeyDown (View view, Editable content, int keyCode, KeyEvent event)

Added in API level 1

Handles presses of the meta keys.

public void onSpanAdded (Spannable s, Object what, int start, int end)

Added in API level 1

This method is called to notify you that the specified object has been attached to the specified range of the text.

public void onSpanChanged (Spannable buf, Object what, int s, int e, int start, int stop)

Added in API level 1

This method is called to notify you that the specified object has been relocated from the range ostart…oend to the new range nstart…nend of the text.

public void onSpanRemoved (Spannable s, Object what, int start, int end)

Added in API level 1

This method is called to notify you that the specified object has been detached from the specified range of the text.

No examples for this method.
Frequently called with: [Clear]
Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. The original page is available here.