# Print output for @column tags ?> TimeKeyListener - Android SDK | Android Developers

Most visited

Recently visited

TimeKeyListener

public class TimeKeyListener
extends NumberKeyListener

java.lang.Object
   ↳ android.text.method.MetaKeyKeyListener
     ↳ android.text.method.BaseKeyListener
       ↳ android.text.method.NumberKeyListener
         ↳ android.text.method.TimeKeyListener


For entering times in a text field.

As for all implementations of KeyListener, this class is only concerned with hardware keyboards. Software input methods have no obligation to trigger the methods in this class.

Summary

Inherited constants

Fields

public static final char[] CHARACTERS

This field is deprecated. Use getAcceptedChars() instead.

Public constructors

TimeKeyListener()

This constructor is deprecated. Use TimeKeyListener(java.util.Locale) instead.

TimeKeyListener(Locale locale)

Public methods

int getInputType()
static TimeKeyListener getInstance()

This method is deprecated. Use getInstance(java.util.Locale) instead.

static TimeKeyListener getInstance(Locale locale)

Returns an instance of TimeKeyListener appropriate for the given locale.

Protected methods

char[] getAcceptedChars()

You can say which characters you can accept.

Inherited methods

Fields

CHARACTERS

public static final char[] CHARACTERS

This field is deprecated.
Use getAcceptedChars() instead.

This field used to list the characters that were used. But is now a fixed data field that is the list of code units used for the deprecated case where the class is instantiated with null or no input parameter.

See also:

Public constructors

TimeKeyListener

public TimeKeyListener ()

This constructor is deprecated.
Use TimeKeyListener(java.util.Locale) instead.

TimeKeyListener

public TimeKeyListener (Locale locale)

Parameters
locale Locale: This value may be null.

Public methods

getInputType

public int getInputType ()

Returns
int

getInstance

public static TimeKeyListener getInstance ()

This method is deprecated.
Use getInstance(java.util.Locale) instead.

Returns
TimeKeyListener This value cannot be null.

getInstance

public static TimeKeyListener getInstance (Locale locale)

Returns an instance of TimeKeyListener appropriate for the given locale.

Parameters
locale Locale: This value may be null.

Returns
TimeKeyListener This value cannot be null.

Protected methods

getAcceptedChars

protected char[] getAcceptedChars ()

You can say which characters you can accept.

Returns
char[] This value cannot be null.