Added in API level 1

DateTimeKeyListener


open class DateTimeKeyListener : NumberKeyListener
kotlin.Any
   ↳ 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 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
Public constructors

Public methods
open Int

open static DateTimeKeyListener

open static DateTimeKeyListener
getInstance(locale: Locale?)

Returns an instance of DateTimeKeyListener appropriate for the given locale.

Protected methods
open CharArray

You can say which characters you can accept.

Inherited functions
Properties
static CharArray!

This field used to list the characters that were used.

Public constructors

DateTimeKeyListener

Added in API level 1
DateTimeKeyListener()

Deprecated: Use DateTimeKeyListener(java.util.Locale) instead.

DateTimeKeyListener

Added in API level 26
DateTimeKeyListener(locale: Locale?)
Parameters
locale Locale?: This value may be null.

Public methods

getInputType

Added in API level 3
open fun getInputType(): Int

getInstance

Added in API level 1
Deprecated in API level 26
open static fun getInstance(): DateTimeKeyListener

Deprecated: Use getInstance(java.util.Locale) instead.

Return
DateTimeKeyListener This value cannot be null.

getInstance

Added in API level 26
open static fun getInstance(locale: Locale?): DateTimeKeyListener

Returns an instance of DateTimeKeyListener appropriate for the given locale.

Parameters
locale Locale?: This value may be null.
Return
DateTimeKeyListener This value cannot be null.

Protected methods

getAcceptedChars

Added in API level 1
protected open fun getAcceptedChars(): CharArray

You can say which characters you can accept.

Return
CharArray This value cannot be null.

Properties

CHARACTERS

Added in API level 1
Deprecated in API level 26
static val CHARACTERS: CharArray!

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.