Added in API level 1
Deprecated in API level 26

DialerFilter


open class DialerFilter : RelativeLayout
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.widget.RelativeLayout
   ↳ android.widget.DialerFilter

This widget is a layout that contains several specifically-named child views that handle keyboard entry interpreted as standard phone dialpad digits.

Summary

Inherited XML attributes
Constants
static Int

This mode has both lines

static Int

This mode is when after starting in DIGITS_AND_LETTERS mode the filter has removed all possibility of the digits matching, leaving only the letters line

static Int

This mode is when after starting in DIGITS_AND_LETTERS mode the filter has removed all possibility of the letters matching, leaving only the digits line

static Int

This mode has only the digits line

static Int

This mode has only the letters line

Inherited constants
Public constructors
DialerFilter(context: Context!)

DialerFilter(context: Context!, attrs: AttributeSet!)

Public methods
open Unit
append(text: String!)

open Unit

Clears both the digits and the filter text.

open CharSequence!

open CharSequence!

open CharSequence!

open Int

open Boolean

open Boolean
onKeyDown(keyCode: Int, event: KeyEvent!)

open Boolean
onKeyUp(keyCode: Int, event: KeyEvent!)

open Unit

open Unit

open Unit

open Unit

open Unit
setMode(newMode: Int)

Change the mode of the widget.

Protected methods
open Unit

open Unit
onFocusChanged(focused: Boolean, direction: Int, previouslyFocusedRect: Rect?)

Only show the icon view when focused, if there is one.

open Unit
onModeChange(oldMode: Int, newMode: Int)

Called right after the mode changes to give subclasses the option to restyle, etc.

Inherited functions
Inherited properties

Constants

DIGITS_AND_LETTERS

Added in API level 1
static val DIGITS_AND_LETTERS: Int

Deprecated: Deprecated in Java.

This mode has both lines

Value: 1

DIGITS_AND_LETTERS_NO_DIGITS

Added in API level 1
static val DIGITS_AND_LETTERS_NO_DIGITS: Int

Deprecated: Deprecated in Java.

This mode is when after starting in DIGITS_AND_LETTERS mode the filter has removed all possibility of the digits matching, leaving only the letters line

Value: 2

DIGITS_AND_LETTERS_NO_LETTERS

Added in API level 1
static val DIGITS_AND_LETTERS_NO_LETTERS: Int

Deprecated: Deprecated in Java.

This mode is when after starting in DIGITS_AND_LETTERS mode the filter has removed all possibility of the letters matching, leaving only the digits line

Value: 3

DIGITS_ONLY

Added in API level 1
static val DIGITS_ONLY: Int

Deprecated: Deprecated in Java.

This mode has only the digits line

Value: 4

LETTERS_ONLY

Added in API level 1
static val LETTERS_ONLY: Int

Deprecated: Deprecated in Java.

This mode has only the letters line

Value: 5

Public constructors

DialerFilter

Added in API level 1
DialerFilter(context: Context!)

DialerFilter

Added in API level 1
DialerFilter(
    context: Context!,
    attrs: AttributeSet!)

Public methods

append

Added in API level 1
open fun append(text: String!): Unit

Deprecated: Deprecated in Java.

clearText

Added in API level 1
open fun clearText(): Unit

Deprecated: Deprecated in Java.

Clears both the digits and the filter text.

getDigits

Added in API level 1
open fun getDigits(): CharSequence!

Deprecated: Deprecated in Java.

getFilterText

Added in API level 1
open fun getFilterText(): CharSequence!

Deprecated: Deprecated in Java.

getLetters

Added in API level 1
open fun getLetters(): CharSequence!

Deprecated: Deprecated in Java.

getMode

Added in API level 1
open fun getMode(): Int

Deprecated: Deprecated in Java.

isQwertyKeyboard

Added in API level 1
open fun isQwertyKeyboard(): Boolean

Deprecated: Deprecated in Java.

onKeyDown

Added in API level 1
open fun onKeyDown(
    keyCode: Int,
    event: KeyEvent!
): Boolean

Deprecated: Deprecated in Java.

Parameters
keyCode Int: a key code that represents the button pressed, from android.view.KeyEvent
event KeyEvent!: the KeyEvent object that defines the button action
Return
Boolean If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false.

onKeyUp

Added in API level 1
open fun onKeyUp(
    keyCode: Int,
    event: KeyEvent!
): Boolean

Deprecated: Deprecated in Java.

Parameters
keyCode Int: A key code that represents the button pressed, from android.view.KeyEvent.
event KeyEvent!: The KeyEvent object that defines the button action.
Return
Boolean If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false.

removeFilterWatcher

Added in API level 1
open fun removeFilterWatcher(watcher: TextWatcher!): Unit

Deprecated: Deprecated in Java.

setDigitsWatcher

Added in API level 1
open fun setDigitsWatcher(watcher: TextWatcher!): Unit

Deprecated: Deprecated in Java.

setFilterWatcher

Added in API level 1
open fun setFilterWatcher(watcher: TextWatcher!): Unit

Deprecated: Deprecated in Java.

setLettersWatcher

Added in API level 1
open fun setLettersWatcher(watcher: TextWatcher!): Unit

Deprecated: Deprecated in Java.

setMode

Added in API level 1
open fun setMode(newMode: Int): Unit

Deprecated: Deprecated in Java.

Change the mode of the widget.

Parameters
newMode Int: The mode to switch to.

Protected methods

onFinishInflate

Added in API level 1
protected open fun onFinishInflate(): Unit

Deprecated: Deprecated in Java.

onFocusChanged

Added in API level 1
protected open fun onFocusChanged(
    focused: Boolean,
    direction: Int,
    previouslyFocusedRect: Rect?
): Unit

Deprecated: Deprecated in Java.

Only show the icon view when focused, if there is one.

Parameters
gainFocus True if the View has focus; false otherwise.
direction Int: The direction focus has moved when requestFocus() is called to give this view focus. Values are FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_FORWARD, or FOCUS_BACKWARD. It may not always apply, in which case use the default. Value is android.view.View#FOCUS_BACKWARD, android.view.View#FOCUS_FORWARD, android.view.View#FOCUS_LEFT, android.view.View#FOCUS_UP, android.view.View#FOCUS_RIGHT, or android.view.View#FOCUS_DOWN
previouslyFocusedRect Rect?: The rectangle, in this view's coordinate system, of the previously focused view. If applicable, this will be passed in as finer grained information about where the focus is coming from (in addition to direction). Will be null otherwise.

onModeChange

Added in API level 1
protected open fun onModeChange(
    oldMode: Int,
    newMode: Int
): Unit

Deprecated: Deprecated in Java.

Called right after the mode changes to give subclasses the option to restyle, etc.