Most visited

Recently visited

Added in API level 1

MultiTapKeyListener

public class MultiTapKeyListener
extends BaseKeyListener implements SpanWatcher

java.lang.Object
   ↳ android.text.method.MetaKeyKeyListener
     ↳ android.text.method.BaseKeyListener
       ↳ android.text.method.MultiTapKeyListener


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

Inherited constants

From class android.text.method.MetaKeyKeyListener

Public constructors

MultiTapKeyListener(TextKeyListener.Capitalize cap, boolean autotext)

Public methods

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

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

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

Handles presses of the meta keys.

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.

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.

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.

Inherited methods

From class android.text.method.BaseKeyListener
From class android.text.method.MetaKeyKeyListener
From class java.lang.Object
From interface android.text.method.KeyListener
From interface android.text.SpanWatcher

Public constructors

MultiTapKeyListener

Added in API level 1
MultiTapKeyListener (TextKeyListener.Capitalize cap, 
                boolean autotext)

Parameters
cap TextKeyListener.Capitalize
autotext boolean

Public methods

getInputType

Added in API level 3
int getInputType ()

Returns
int

getInstance

Added in API level 1
MultiTapKeyListener getInstance (boolean autotext, 
                TextKeyListener.Capitalize cap)

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

Parameters
autotext boolean
cap TextKeyListener.Capitalize
Returns
MultiTapKeyListener

onKeyDown

Added in API level 1
boolean onKeyDown (View view, 
                Editable content, 
                int keyCode, 
                KeyEvent event)

Handles presses of the meta keys.

Parameters
view View
content Editable
keyCode int
event KeyEvent
Returns
boolean

onSpanAdded

Added in API level 1
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.

Parameters
s Spannable
what Object
start int
end int

onSpanChanged

Added in API level 1
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.

Parameters
buf Spannable
what Object
s int
e int
start int
stop int

onSpanRemoved

Added in API level 1
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.

Parameters
s Spannable
what Object
start int
end int

Hooray!