* commit '887568c4f4e49b78b1549459b265377c7ee4e8c0': Add/refine comments to reflect key event policies
This commit is contained in:
@@ -28,6 +28,10 @@ import android.widget.TextView;
|
||||
* Provides a basic foundation for entering and editing text.
|
||||
* Subclasses should override {@link #onKeyDown} and {@link #onKeyUp} to insert
|
||||
* characters as keys are pressed.
|
||||
* <p></p>
|
||||
* As for all implementations of {@link KeyListener}, this class is only concerned
|
||||
* with hardware keyboards. Software input methods have no obligation to trigger
|
||||
* the methods in this class.
|
||||
*/
|
||||
public abstract class BaseKeyListener extends MetaKeyKeyListener
|
||||
implements KeyListener {
|
||||
|
||||
@@ -21,6 +21,10 @@ import android.text.InputType;
|
||||
|
||||
/**
|
||||
* For entering dates in a text field.
|
||||
* <p></p>
|
||||
* As for all implementations of {@link KeyListener}, this class is only concerned
|
||||
* with hardware keyboards. Software input methods have no obligation to trigger
|
||||
* the methods in this class.
|
||||
*/
|
||||
public class DateKeyListener extends NumberKeyListener
|
||||
{
|
||||
|
||||
@@ -21,6 +21,10 @@ import android.view.KeyEvent;
|
||||
|
||||
/**
|
||||
* For entering dates and times in the same text field.
|
||||
* <p></p>
|
||||
* As for all implementations of {@link KeyListener}, this class is only concerned
|
||||
* with hardware keyboards. Software input methods have no obligation to trigger
|
||||
* the methods in this class.
|
||||
*/
|
||||
public class DateTimeKeyListener extends NumberKeyListener
|
||||
{
|
||||
|
||||
@@ -23,6 +23,10 @@ import android.text.Spannable;
|
||||
|
||||
/**
|
||||
* For dialing-only text entry
|
||||
* <p></p>
|
||||
* As for all implementations of {@link KeyListener}, this class is only concerned
|
||||
* with hardware keyboards. Software input methods have no obligation to trigger
|
||||
* the methods in this class.
|
||||
*/
|
||||
public class DialerKeyListener extends NumberKeyListener
|
||||
{
|
||||
|
||||
@@ -24,6 +24,10 @@ import android.view.KeyEvent;
|
||||
|
||||
/**
|
||||
* For digits-only text entry
|
||||
* <p></p>
|
||||
* As for all implementations of {@link KeyListener}, this class is only concerned
|
||||
* with hardware keyboards. Software input methods have no obligation to trigger
|
||||
* the methods in this class.
|
||||
*/
|
||||
public class DigitsKeyListener extends NumberKeyListener
|
||||
{
|
||||
|
||||
@@ -27,6 +27,12 @@ import android.view.View;
|
||||
* {@link android.view.inputmethod.InputMethod}; it should only be used
|
||||
* for cases where an application has its own on-screen keypad and also wants
|
||||
* to process hard keyboard events to match it.
|
||||
* <p></p>
|
||||
* Key presses on soft input methods are not required to trigger the methods
|
||||
* in this listener, and are in fact discouraged to do so. The default
|
||||
* android keyboard will not trigger these for any key to any application
|
||||
* targetting Jelly Bean or later, and will only deliver it for some
|
||||
* key presses to applications targetting Ice Cream Sandwich or earlier.
|
||||
*/
|
||||
public interface KeyListener {
|
||||
/**
|
||||
|
||||
@@ -28,6 +28,10 @@ import android.util.SparseArray;
|
||||
* This is the standard key listener for alphabetic input on 12-key
|
||||
* keyboards. You should generally not need to instantiate this yourself;
|
||||
* TextKeyListener will do it for you.
|
||||
* <p></p>
|
||||
* As for all implementations of {@link KeyListener}, this class is only concerned
|
||||
* with hardware keyboards. Software input methods have no obligation to trigger
|
||||
* the methods in this class.
|
||||
*/
|
||||
public class MultiTapKeyListener extends BaseKeyListener
|
||||
implements SpanWatcher {
|
||||
|
||||
@@ -27,6 +27,10 @@ import android.text.Spanned;
|
||||
|
||||
/**
|
||||
* For numeric text entry
|
||||
* <p></p>
|
||||
* As for all implementations of {@link KeyListener}, this class is only concerned
|
||||
* with hardware keyboards. Software input methods have no obligation to trigger
|
||||
* the methods in this class.
|
||||
*/
|
||||
public abstract class NumberKeyListener extends BaseKeyListener
|
||||
implements InputFilter
|
||||
|
||||
@@ -27,6 +27,10 @@ import android.view.View;
|
||||
* 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.
|
||||
* <p></p>
|
||||
* As for all implementations of {@link KeyListener}, this class is only concerned
|
||||
* with hardware keyboards. Software input methods have no obligation to trigger
|
||||
* the methods in this class.
|
||||
*/
|
||||
public class QwertyKeyListener extends BaseKeyListener {
|
||||
private static QwertyKeyListener[] sInstance =
|
||||
|
||||
@@ -33,6 +33,10 @@ import java.lang.ref.WeakReference;
|
||||
/**
|
||||
* This is the key listener for typing normal text. It delegates to
|
||||
* other key listeners appropriate to the current keyboard and language.
|
||||
* <p></p>
|
||||
* As for all implementations of {@link KeyListener}, this class is only concerned
|
||||
* with hardware keyboards. Software input methods have no obligation to trigger
|
||||
* the methods in this class.
|
||||
*/
|
||||
public class TextKeyListener extends BaseKeyListener implements SpanWatcher {
|
||||
private static TextKeyListener[] sInstance =
|
||||
|
||||
@@ -21,6 +21,10 @@ import android.text.InputType;
|
||||
|
||||
/**
|
||||
* For entering times in a text field.
|
||||
* <p></p>
|
||||
* As for all implementations of {@link KeyListener}, this class is only concerned
|
||||
* with hardware keyboards. Software input methods have no obligation to trigger
|
||||
* the methods in this class.
|
||||
*/
|
||||
public class TimeKeyListener extends NumberKeyListener
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user