public class Picker
extends FrameLayout

   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ androidx.leanback.widget.picker.Picker

Picker is a widget showing multiple customized PickerColumns. The PickerColumns are initialized in setColumns(List). Call setColumnAt(int, PickerColumn) if the column value range or labels change. Call setColumnValue(int, int, boolean) to update the current value of PickerColumn.

Picker has two states and will change height:

  • View.isActivated() is true: Picker shows typically three items vertically (see getActivatedVisibleItemCount()}. Columns other than getSelectedColumn() still shows one item if the Picker is focused. On a touch screen device, the Picker will not get focus so it always show three items on all columns. On a non-touch device (a TV), the Picker will show three items only on currently activated column. If the Picker has focus, it will intercept DPAD directions and select activated column.
  • View.isActivated() is false: Picker shows one item vertically (see getVisibleItemCount()) on all columns. The size of Picker shrinks.


Nested classes

interface Picker.PickerValueListener

Listener for Picker value changes. 

Inherited constants