Build 1.0_r1(from source)

android.text.method
Class QwertyKeyListener

java.lang.Object
  extended by android.text.method.MetaKeyKeyListener
      extended by android.text.method.BaseKeyListener
          extended by android.text.method.QwertyKeyListener
All Implemented Interfaces:
KeyListener

public class QwertyKeyListener
extends BaseKeyListener

This is the standard key listener for alphabetic input on qwerty keyboards. You should generally not need to instantiate this yourself; TextKeyListener will do it for you.


Nested Class Summary
(package private) static class QwertyKeyListener.Replaced
           
 
Field Summary
 
Fields inherited from class android.text.method.BaseKeyListener
OLD_SEL_START
 
Fields inherited from class android.text.method.MetaKeyKeyListener
META_ALT_LOCKED, META_ALT_ON, META_CAP_LOCKED, META_SHIFT_ON, META_SYM_LOCKED, META_SYM_ON
 
Constructor Summary
QwertyKeyListener(TextKeyListener.Capitalize cap, boolean autotext)
           
 
Method Summary
static QwertyKeyListener getInstance(boolean autotext, TextKeyListener.Capitalize cap)
          Returns a new or existing instance with the specified capitalization and correction properties.
static void markAsReplaced(Spannable content, int start, int end, String original)
          Marks the specified region of content as having contained original prior to AutoText replacement.
 boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event)
          Handles presses of the meta keys.
 
Methods inherited from class android.text.method.BaseKeyListener
backspace
 
Methods inherited from class android.text.method.MetaKeyKeyListener
adjustMetaAfterKeypress, getMetaState, getMetaState, isMetaTracker, onKeyUp, resetLockedMeta, resetMetaState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface android.text.method.KeyListener
onKeyUp
 

Constructor Detail

QwertyKeyListener

public QwertyKeyListener(TextKeyListener.Capitalize cap,
                         boolean autotext)
Method Detail

getInstance

public static QwertyKeyListener getInstance(boolean autotext,
                                            TextKeyListener.Capitalize cap)
Returns a new or existing instance with the specified capitalization and correction properties.


onKeyDown

public boolean onKeyDown(View view,
                         Editable content,
                         int keyCode,
                         KeyEvent event)
Description copied from class: MetaKeyKeyListener
Handles presses of the meta keys.

Specified by:
onKeyDown in interface KeyListener
Overrides:
onKeyDown in class BaseKeyListener

markAsReplaced

public static void markAsReplaced(Spannable content,
                                  int start,
                                  int end,
                                  String original)
Marks the specified region of content as having contained original prior to AutoText replacement. Call this method when you have done or are about to do an AutoText-style replacement on a region of text and want to let the same mechanism (the user pressing DEL immediately after the change) undo the replacement.

Parameters:
content - the Editable text where the replacement was made
start - the start of the replaced region
end - the end of the replaced region; the location of the cursor
original - the text to be restored if the user presses DEL

Build 1.0_r1(from source)

Please submit a feedback, bug or feature