DateTimeKeyListener
public
class
DateTimeKeyListener
extends NumberKeyListener
java.lang.Object | ||||
↳ | android.text.method.MetaKeyKeyListener | |||
↳ | android.text.method.BaseKeyListener | |||
↳ | android.text.method.NumberKeyListener | |||
↳ | android.text.method.DateTimeKeyListener |
For entering dates and times in the same text field.
As for all implementations ofKeyListener
, 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 was deprecated
in API level 26.
Use |
Public constructors | |
---|---|
DateTimeKeyListener()
This constructor is deprecated.
Use |
|
DateTimeKeyListener(Locale locale)
|
Public methods | |
---|---|
int
|
getInputType()
|
static
DateTimeKeyListener
|
getInstance()
This method was deprecated
in API level 26.
Use |
static
DateTimeKeyListener
|
getInstance(Locale locale)
Returns an instance of DateTimeKeyListener 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 was deprecated
in API level 26.
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.
Public constructors
DateTimeKeyListener
public DateTimeKeyListener ()
This constructor is deprecated.
Use DateTimeKeyListener(java.util.Locale)
instead.
DateTimeKeyListener
public DateTimeKeyListener (Locale locale)
Parameters | |
---|---|
locale |
Locale : This value may be null . |
Public methods
getInstance
public static DateTimeKeyListener getInstance ()
This method was deprecated
in API level 26.
Use getInstance(java.util.Locale)
instead.
Returns | |
---|---|
DateTimeKeyListener |
This value cannot be null . |
getInstance
public static DateTimeKeyListener getInstance (Locale locale)
Returns an instance of DateTimeKeyListener appropriate for the given locale.
Parameters | |
---|---|
locale |
Locale : This value may be null . |
Returns | |
---|---|
DateTimeKeyListener |
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 . |