Class: Toybox.WatchUi.PickerFactory

Overview

Create a PickerFactory.

A PickerFactory is used to specify which objects will be displayed by a Picker

See Also:

Note:

See the Picker sample distributed with the SDK for an example of the use of the PickerFactory class

Since:

API Level 1.2.0

Supported Devices:

Instance Method Summary collapse

Instance Method Details

getDrawable(item as Lang.Number, isSelected as Lang.Boolean) as WatchUi.Drawable or Null

Generate a Drawable instance for an item.

Parameters:

  • item(Lang.Number)

    The item index

  • isSelected(Lang.Boolean)

    true if the current item is the selected item, otherwise false

Returns:

Since:

API Level 1.2.0

getSize() as Lang.Number

Get the number of items in the PickerFactory.

Returns:

Since:

API Level 1.2.0

getValue(item as Lang.Number) as Lang.Object or Null

Return value for an item.

Parameters:

Returns:

Since:

API Level 1.2.0


Generated Jun 26, 2024 1:13:56 PM