PinPicker

public class PinPicker
extends Picker

java.lang.Object
   ↳ 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

Inherited constants

Inherited fields

Public constructors

PinPicker(Context context, AttributeSet attrs)
PinPicker(Context context, AttributeSet attrs, int defStyleAttr)

Public methods

boolean dispatchKeyEvent(KeyEvent event)
String getPin()

Returns the PIN that the user has entered.

boolean performClick()
void resetPin()

Resets all columns and selects the first one.

void setNumberOfColumns(int count)

Sets the number of columns for entering the PIN.

Inherited methods

Public constructors

PinPicker

public PinPicker (Context context, 
                AttributeSet attrs)

Parameters
context Context

attrs AttributeSet

PinPicker

public PinPicker (Context context, 
                AttributeSet attrs, 
                int defStyleAttr)

Parameters
context Context

attrs AttributeSet

defStyleAttr int

Public methods

dispatchKeyEvent

public boolean dispatchKeyEvent (KeyEvent event)

Parameters
event KeyEvent

Returns
boolean

getPin

public String getPin ()

Returns the PIN that the user has entered.

Returns
String Currently entered PIN

performClick

public boolean performClick ()

Returns
boolean

resetPin

public void resetPin ()

Resets all columns and selects the first one.

setNumberOfColumns

public void setNumberOfColumns (int count)

Sets the number of columns for entering the PIN.

Parameters
count int: how many columns to display.