Added in API level 1

DialerKeyListener


open class DialerKeyListener : NumberKeyListener
kotlin.Any
   ↳ android.text.method.MetaKeyKeyListener
   ↳ android.text.method.BaseKeyListener
   ↳ android.text.method.NumberKeyListener
   ↳ android.text.method.DialerKeyListener

For dialing-only text entry

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

Return the type of text that this key listener is manipulating, as per android.text.InputType.

open static DialerKeyListener!

Protected methods
open CharArray

You can say which characters you can accept.

open Int
lookup(event: KeyEvent!, content: Spannable!)

Overrides the superclass's lookup method to prefer the number field from the KeyEvent.

Inherited functions
Properties
static CharArray!

The characters that are used.

Public constructors

DialerKeyListener

DialerKeyListener()

Public methods

getInputType

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

Return the type of text that this key listener is manipulating, as per android.text.InputType. This is used to determine the mode of the soft keyboard that is shown for the editor.

If you return android.text.InputType#TYPE_NULL then no soft keyboard will provided. In other words, you must be providing your own key pad for on-screen input and the key listener will be used to handle input from a hard keyboard.

If you return any other value, a soft input method will be created when the user puts focus in the editor, which will provide a keypad and also consume hard key events. This means that the key listener will generally not be used, instead the soft input method will take care of managing key input as per the content type returned here.

getInstance

Added in API level 1
open static fun getInstance(): DialerKeyListener!

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.

lookup

Added in API level 1
protected open fun lookup(
    event: KeyEvent!,
    content: Spannable!
): Int

Overrides the superclass's lookup method to prefer the number field from the KeyEvent.

Properties

CHARACTERS

Added in API level 1
static val CHARACTERS: CharArray!

The characters that are used.