Android
android.text.method
public class

android.text.method.QwertyKeyListener

java.lang.Object
android.text.method.MetaKeyKeyListener
android.text.method.BaseKeyListener KeyListener
android.text.method.QwertyKeyListener

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.

Summary

Constants inherited from class android.text.method.MetaKeyKeyListener

Public Constructors

            QwertyKeyListener(TextKeyListener.Capitalize cap, boolean autotext)

Public Methods

      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
Methods inherited from class android.text.method.MetaKeyKeyListener
Methods inherited from class java.lang.Object
Methods inherited from interface android.text.method.KeyListener

Details

Public Constructors

public QwertyKeyListener(TextKeyListener.Capitalize cap, boolean autotext)

Public Methods

public static QwertyKeyListener getInstance(boolean autotext, TextKeyListener.Capitalize cap)

Returns a new or existing instance with the specified capitalization and correction properties.

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

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

Handles presses of the meta keys.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56