DialerKeyListener
public class DialerKeyListener
extends NumberKeyListener
用于拨号文本输入
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)
Fields |
public static final char[] |
CHARACTERS 使用的字符。 |
继承方法(Inherited methods) |
From class android.text.method.NumberKeyListener
CharSequence |
filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) 这种方法被称为缓冲区时,将取代范围 dstart … dend的 dest从范围内的新文字 start … end的 source 。 |
abstract char[] |
getAcceptedChars() 你可以说你可以接受哪些角色。 |
int |
lookup(KeyEvent event, Spannable content) |
static boolean |
ok(char[] accept, char c) |
boolean |
onKeyDown(View view, Editable content, int keyCode, KeyEvent event) 处理元键的按下。 |
|
From class android.text.method.BaseKeyListener
boolean |
backspace(View view, Editable content, int keyCode, KeyEvent event) 执行在 KEYCODE_DEL中按下 KEYCODE_DEL键时发生的 TextView 。 |
boolean |
forwardDelete(View view, Editable content, int keyCode, KeyEvent event) 执行在 KEYCODE_FORWARD_DEL中按 KEYCODE_FORWARD_DEL键时发生的 TextView 。 |
boolean |
onKeyDown(View view, Editable content, int keyCode, KeyEvent event) 处理元键的按下。 |
boolean |
onKeyOther(View view, Editable content, KeyEvent event) 基本实现通过将事件的文本插入内容来处理ACTION_MULTIPLE KEYCODE_UNKNOWN。 |
|
From class android.text.method.MetaKeyKeyListener
static void |
adjustMetaAfterKeypress(Spannable content) 处理按键后调用此方法,以便元状态将重置为未移位(如果尚未移位)或已准备好重设为未移位(一旦释放)。 |
static long |
adjustMetaAfterKeypress(long state) 处理按键后调用此方法,以便元状态将重置为未移位(如果尚未移位)或已准备好重设为未移位(一旦释放)。 |
static void |
clearMetaKeyState(Editable content, int states) |
long |
clearMetaKeyState(long state, int which) 如果指定的元键被锁定,则清除其状态。 |
void |
clearMetaKeyState(View view, Editable content, int states) |
static final int |
getMetaState(CharSequence text) 获取元键的状态。 |
static final int |
getMetaState(CharSequence text, int meta) 获取特定元键的状态。 |
static final int |
getMetaState(long state) 获取元键的状态。 |
static final int |
getMetaState(CharSequence text, KeyEvent event) 获取特定按键事件的元键的状态。 |
static final int |
getMetaState(long state, int meta) 获取特定元键的状态。 |
static final int |
getMetaState(CharSequence text, int meta, KeyEvent event) 获取特定元键的状态以用于特定键事件。 |
static long |
handleKeyDown(long state, int keyCode, KeyEvent event) 处理元键的按下。 |
static long |
handleKeyUp(long state, int keyCode, KeyEvent event) 处理元键的释放。 |
static boolean |
isMetaTracker(CharSequence text, Object what) 如果此对象是此类将用于跟踪指定文本中的任何元状态的对象,则返回true。 |
static boolean |
isSelectingMetaTracker(CharSequence text, Object what) 如果此对象是此类将用于跟踪指定文本中的选定元状态的对象,则返回true。 |
boolean |
onKeyDown(View view, Editable content, int keyCode, KeyEvent event) 处理元键的按下。 |
boolean |
onKeyUp(View view, Editable content, int keyCode, KeyEvent event) 处理元键的释放。 |
static long |
resetLockedMeta(long state) 如果您是一种忽略锁定元状态(例如箭头键)并处理密钥的方法,请调用此方法。 |
static void |
resetLockedMeta(Spannable content) 如果您是一种忽略锁定元状态(例如箭头键)并处理密钥的方法,请调用此方法。 |
static void |
resetMetaState(Spannable text) 将所有元状态重置为非活动状态。 |
|
From class java.lang.Object
|
From interface android.text.InputFilter
|
From interface android.text.method.KeyListener
abstract void |
clearMetaKeyState(View view, Editable content, int states) 从编辑的文本中移除给定的移位状态。 |
abstract int |
getInputType() 按照 InputType返回此按键侦听器正在操作的文本类型。 |
abstract boolean |
onKeyDown(View view, Editable text, int keyCode, KeyEvent event) 如果键监听器想要处理这个键,则返回true,否则返回false,并且调用者(即小部件主机)将处理该键。 |
abstract boolean |
onKeyOther(View view, Editable text, KeyEvent event) 如果键监听器想要其他类型的键事件,则返回true,否则返回false,并且调用方(即小部件主机)将处理该键。 |
abstract boolean |
onKeyUp(View view, Editable text, int keyCode, KeyEvent event) 如果键监听器想要处理这个键释放,则返回true,否则返回false,并且调用者(即小部件主机)将处理该键。 |
|
Fields
CHARACTERS
char[] CHARACTERS
使用的字符。
Public constructors
DialerKeyListener
DialerKeyListener ()
公共方法(Public methods)
getInputType
int getInputType ()
Protected methods
getAcceptedChars
char[] getAcceptedChars ()
你可以说你可以接受哪些角色。
lookup
int lookup (KeyEvent event,
Spannable content)
重写超类的查找方法以优先考虑KeyEvent中的数字字段。
| 参数(Parameters) |
event |
KeyEvent
|
content |
Spannable
|