Class: Toybox::WatchUi::DataField
DataField クラスは データフィールドを作成するために用いられる。開発者は 毎分呼び出され、Activity.info を引数として取る compute() をオーバーライドして表示の更新を行う。システムはフィールドが更新される度に onUpdate() を呼び出し、
- Since : 1.0.0
- サポートするデバイス : 全てのデバイス
直下のサブクラス
Constant Summary
OBSCURE_* 丸いスクリーンで、描画時に欠けが発生するか?
- OBSCURE_LEFT = 1 : 左側が欠ける。 Since : 1.0.0
- OBSCURE_TOP = 2 : 上側が欠ける。 Since : 1.0.0
- OBSCURE_RIGHT = 4 : 右側が欠ける。 Since : 1.0.0
- OBSCURE_BOTTOM = 8 : 下側が欠ける。 Since : 1.0.0
関数(要約)
- (Object) compute(info) : フィールド情報が更新されたら実行される。Activity.info を取得できる。
- (Number) getBackgroundColor : The current background color for data fields, which is either Graphics.COLOR_WHITE or Graphics.COLOR_BLACK.
- (Number) getObscurityFlags : Mask of OBSCURE_X values giving the sides of the display that that are obscured by a round screen.
- (DataField) initialize constructor : Constructor.
Viewクラスから継承した関数
#findDrawableById
, #onHide, #onLayout, #onShow, #onUpdate, #setLayout
Constructor Details
Constructor
Instance Method Details
(Object) compute(info) : フィールド情報が更新されたら実行される。Activity.info を取得できる。
オーバーライドして実行する。
- Parameters
- info (Activity.Info) : The updated Activity.Info object
- Since : 1.0.0
(Number) getBackgroundColor
Returns the current background color for data fields, which is either Graphics.COLOR_WHITE or Graphics.COLOR_BLACK
- Returns : (Number) the current background color for data fields, which is either Graphics.COLOR_WHITE or Graphics.COLOR_BLACK
- Since : 1.2.0
(Number) getObscurityFlags
Returns mask of OBSCURE_X values giving the sides of the display that that are obscured by a round screen. Valid during onUpdate.
- Returns : (Number) mask of OBSCURE_X values giving the sides of the display that that are obscured by a round screen. Valid during onUpdate.
- Since : 1.0.0
最終更新:2016年03月12日 01:31