Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

PinPicker

open class PinPicker : Picker
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.widget.FrameLayout
   ↳ androidx.leanback.widget.picker.Picker
   ↳ androidx.leanback.widget.picker.PinPicker

Picker subclass for allowing the user to enter a numerical PIN. The column count can be customized, and defaults to 4. R.attr#columnCount

Summary

Public constructors
<init>(context: Context!, attrs: AttributeSet!)

<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

Public methods
open Unit

Sets the number of columns for entering the PIN.

open Boolean

open Boolean

open String!

Returns the PIN that the user has entered.

open Unit

Resets all columns and selects the first one.

Inherited functions

Public constructors

<init>

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

<init>

PinPicker(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

Public methods

setNumberOfColumns

open fun setNumberOfColumns(count: Int): Unit

Sets the number of columns for entering the PIN.

Parameters
count Int: how many columns to display.

performClick

open fun performClick(): Boolean

dispatchKeyEvent

open fun dispatchKeyEvent(event: KeyEvent!): Boolean

getPin

open fun getPin(): String!

Returns the PIN that the user has entered.

Return
String!: Currently entered PIN

resetPin

open fun resetPin(): Unit

Resets all columns and selects the first one.