Class: Toybox::WatchUi::SimpleDataField
The SimpleDataField class is used for creating simple data fields. In a SimpleDataField, the developer is only required to implement a compute method. The compute method is passed an Activity.Info object, which contains all current workout information. The compute method should return a value to be displayed. Allowed types are Number, Float, Long, Double, Duration, and String. The SimpleDataField also contains a variable “label”. This variable should be assigned to a String label for the field.
- Since : 1.0.0
- Supported Devices : All devices
Constant Summary
DataField から継承した定数
DataField::OBSCURE_BOTTOM, DataField::OBSCURE_LEFT, DataField::OBSCURE_RIGHT, DataField::OBSCURE_TOP
Instance Attribute Summary
関数
(Object) compute(info)
To retrieve Activity.Info data for DataFields, it is necessary to override compute().
(SimpleDataField) initialize constructor
Constructor.
DataField 継承された関数
#getBackgroundColor
, #getObscurityFlags
View クラスから解消された関数
#findDrawableById
, #onHide, #onLayout, #onShow, #onUpdate, #setLayout
コンストラクタ(SimpleDataField) initialize
Instance Attribute Details
(Object) label : データエリアに表示するラベル。 Since : 1.0.0
関数
(Object) compute(info) : Activity.Info を用いて、フィールド情報を計算する
戻り値に表示させるフィールド(値)を設定する
- Parameters
- info (Activity.Info) : The updated Activity.Info object
- Since : 1.0.0
最終更新:2016年03月13日 00:26