public final class KeyEventCompat
extends Object
java.lang.Object | |
↳ | android.support.v4.view.KeyEventCompat |
Helper用于访问以向后兼容的方式在API级别4之后引入的 KeyEvent
功能。
Public methods |
|
---|---|
static boolean |
dispatch(KeyEvent event, KeyEvent.Callback receiver, Object state, Object target) |
static Object |
getKeyDispatcherState(View view) |
static boolean |
hasModifiers(KeyEvent event, int modifiers) |
static boolean |
hasNoModifiers(KeyEvent event) |
static boolean |
isCtrlPressed(KeyEvent event) |
static boolean |
isTracking(KeyEvent event) |
static boolean |
metaStateHasModifiers(int metaState, int modifiers) |
static boolean |
metaStateHasNoModifiers(int metaState) |
static int |
normalizeMetaState(int metaState) |
static void |
startTracking(KeyEvent event) |
Inherited methods |
|
---|---|
From class java.lang.Object
|
boolean dispatch (KeyEvent event, KeyEvent.Callback receiver, Object state, Object target)
Parameters | |
---|---|
event |
KeyEvent
|
receiver |
KeyEvent.Callback
|
state |
Object
|
target |
Object
|
Returns | |
---|---|
boolean |
boolean hasModifiers (KeyEvent event, int modifiers)
Parameters | |
---|---|
event |
KeyEvent
|
modifiers |
int
|
Returns | |
---|---|
boolean |
boolean metaStateHasModifiers (int metaState, int modifiers)
Parameters | |
---|---|
metaState |
int
|
modifiers |
int
|
Returns | |
---|---|
boolean |
boolean metaStateHasNoModifiers (int metaState)
Parameters | |
---|---|
metaState |
int
|
Returns | |
---|---|
boolean |
int normalizeMetaState (int metaState)
Parameters | |
---|---|
metaState |
int
|
Returns | |
---|---|
int |