Skip to end of metadata
Go to start of metadata

Demonstrates basic use of the Picker control to let a user select one or more fixed values.

Example App Source Location

Icon

You can find this example app in the Alloy repository under samples/apps/ui/picker. Check the instructions how to run these sample projects.

The sample application demonstrates creating single- and multi-column Picker, as well as Alloy short-hand for declaring columns and rows. Note that, on Android, the Picker's useSpinner property must be set to true to enable multi-column pickers.

To declare columns and rows you can use <PickerRow/> and <PickerColumn/> elements, or the shorthand <Row/> and <Column/> elements.

app/views/index.xml

The index.tss file sets the Picker object's selectionIndicator property to true, and sets useSpinner to true on Android devices.

app/styles/index.tss

See also

  • No labels