Class: Toybox::WatchUi::Picker

Inherits:
View show all

Overview

Note:

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

Note:

The look and feel of a Picker is device-specific, though every device will have the same general layout.

A representation of an on-screen generic picker.

A Picker consists of one or more choose-able objects, a title, a next and previous arrow, and a confirmation button. The next and previous arrows and the confirmation button are device specific but can be overridden if desired. A Picker is pushed using pushView(), which provides a PickerDelegate.

A PickerFactory is required to indicate what should be displayed for each pick-able value, and is capable of displaying any number of entries from which may be chosen. For example, consider the following:

new NumberFactory();
new Ui.Text({:text=>"-"});
new NumberFactory();

This Picker will have three entries: a choosable number, a non-choosable “-”, and another choosable number.

See Also:

Since:

  • 1.2.0

Instance Method Summary collapse

Methods inherited from View

addLayer, clearLayers, findDrawableById, getLayerIndex, getLayers, insertLayer, onHide, onLayout, onShow, onUpdate, removeLayer, setKeyToSelectableInteraction, setLayout

Methods inherited from Lang::Object

equals, hashCode, method, toString, weak

Constructor Details

initialize(settings) ⇒ Picker

Returns a new instance of Picker

Parameters:

See Also:

Since:

  • 1.2.0


16100
16101
# File 'Monkeybrains.rb', line 16100

def initialize(settings)
end

Instance Method Details

setOptions(settings) ⇒ Object

Set the options for the Picker.

Parameters:

Options Hash (settings):

See Also:

Since:

  • 1.2.0


16125
16126
# File 'Monkeybrains.rb', line 16125

def setOptions(settings)
end