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


这是12键键盘上的字母输入的标准关键听众。 通常你不需要自己实例化它; TextKeyListener会为你做。

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)

返回具有指定大小写和更正属性的新实例或现有实例。

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

处理元键的按下。

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

调用此方法通知您指定的对象已附加到文本的指定范围。

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

调用此方法通知您,指定的对象已从范围 ostart…oend重新定位到文本的新范围 nstart…nend

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

调用此方法通知您指定的对象已从指定的文本范围中分离。

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)

返回具有指定大小写和更正属性的新实例或现有实例。

Parameters
autotext boolean
cap TextKeyListener.Capitalize
Returns
MultiTapKeyListener

onKeyDown

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

处理元键的按下。

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)

调用此方法通知您指定的对象已附加到文本的指定范围。

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)

调用此方法通知您指定的对象已从范围 ostart…oend重新定位到文本的新范围 nstart…nend

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)

调用此方法通知您指定的对象已从指定的文本范围中分离。

Parameters
s Spannable
what Object
start int
end int

Hooray!