|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.text.method.MetaKeyKeyListener
public abstract class MetaKeyKeyListener
This base class encapsulates the behavior for handling the meta keys (caps, fn, sym). Key listener that care about meta state should inherit from it; you should not instantiate this class directly in a client.
| Field Summary | |
|---|---|
static int |
META_ALT_LOCKED
|
static int |
META_ALT_ON
|
static int |
META_CAP_LOCKED
|
static int |
META_SHIFT_ON
|
static int |
META_SYM_LOCKED
|
static int |
META_SYM_ON
|
| Constructor Summary | |
|---|---|
MetaKeyKeyListener()
|
|
| Method Summary | |
|---|---|
static void |
adjustMetaAfterKeypress(Spannable content)
Call this method after you handle a keypress so that the meta state will be reset to unshifted (if it is not still down) or primed to be reset to unshifted (once it is released). |
static int |
getMetaState(CharSequence text)
Gets the state of the meta keys. |
static int |
getMetaState(CharSequence text,
int meta)
Gets the state of a particular meta key. |
static boolean |
isMetaTracker(CharSequence text,
Object what)
Returns true if this object is one that this class would use to keep track of meta state in the specified text. |
boolean |
onKeyDown(View view,
Editable content,
int keyCode,
KeyEvent event)
Handles presses of the meta keys. |
boolean |
onKeyUp(View view,
Editable content,
int keyCode,
KeyEvent event)
Handles release of the meta keys. |
protected static void |
resetLockedMeta(Spannable content)
Call this if you are a method that ignores the locked meta state (arrow keys, for example) and you handle a key. |
static void |
resetMetaState(Spannable text)
Resets all meta state to inactive. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int META_SHIFT_ON
public static final int META_ALT_ON
public static final int META_SYM_ON
public static final int META_CAP_LOCKED
public static final int META_ALT_LOCKED
public static final int META_SYM_LOCKED
| Constructor Detail |
|---|
public MetaKeyKeyListener()
| Method Detail |
|---|
public static void resetMetaState(Spannable text)
public static final int getMetaState(CharSequence text)
text - the buffer in which the meta key would have been pressed.
public static final int getMetaState(CharSequence text,
int meta)
meta - META_SHIFT_ON, META_ALT_ON, or META_SYM_ONtext - the buffer in which the meta key would have been pressed.
public static void adjustMetaAfterKeypress(Spannable content)
public static boolean isMetaTracker(CharSequence text,
Object what)
protected static void resetLockedMeta(Spannable content)
public boolean onKeyDown(View view,
Editable content,
int keyCode,
KeyEvent event)
public boolean onKeyUp(View view,
Editable content,
int keyCode,
KeyEvent event)
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||