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 ofKeyListener, this class is only concerned
with hardware keyboards. Software input methods have no obligation to trigger
the methods in this class.
Summary
Inherited constants |
|---|
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 |
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 | |
|---|---|
Public constructors
MultiTapKeyListener
public MultiTapKeyListener (TextKeyListener.Capitalize cap, boolean autotext)
| Parameters | |
|---|---|
cap |
TextKeyListener.Capitalize |
autotext |
boolean |
Public methods
getInstance
public static 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
public 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
public 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
public 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
public 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 |