Class: $.ConfigurationWatchFaceView
- Inherits:
-
WatchUi.WatchFace
-
WatchUi.WatchFace
-
Overview
Watch face view that handles both normal and configuration modes
Constant Summary
Constant Variables
| Type | Name | Value | Since | Description |
|---|---|---|---|---|
| Type | _DEFAULT_ACCENT_COLOR | Graphics.COLOR_GREEN | ||
| Type | _DEFAULT_BOTTOM_COMPLICATION | Complications.COMPLICATION_TYPE_STEPS | ||
| Type | _DEFAULT_DATA_COLOR | Graphics.COLOR_WHITE | ||
| Type | _DEFAULT_STYLE | Styles.HOUR_MINUTES_SECONDS | ||
| Type | _DEFAULT_TOP_COMPLICATION | Complications.COMPLICATION_TYPE_BATTERY |
Instance Member Summary collapse
-
_accentColor as Lang.Number
The color for the time.
-
_bottomComplicationId as Complications.Id
The bottom complication.
-
_complicationColor as Lang.Number
The color for the complications.
-
_editMode as Lang.Boolean
If the view is in edit mode or not.
-
_editingComplication as Lang.Boolean
Whether or not a complcation is being edited.
-
_selectedComplication as Complications.Id or Null
The selected complication when editing.
-
_style as Lang.Number
The style to display the time in.
-
_styleString as Lang.String
The format string for the time.
-
_topComplicationId as Complications.Id
The top complication.
Instance Method Summary collapse
-
complicationTapped(drawableId as Lang.String, x as Lang.Number, y as Lang.Number) as Lang.Boolean
Determine if a complication was tapped.
-
getComplication(complication as WatchFaceConfig.ComplicationRef) as WatchUi.ComplicationDrawableRef or Null
Get the complication drawable for the given complication reference.
-
getTappedComplication(x as Lang.Number, y as Lang.Number) as ComplicationLocation.Value or Null
Get the complication tapped at the given coordinates.
-
initialize(editMode as Lang.Boolean)
Constructor.
-
onComplicationChange(id as Complications.Id) as Void
Callback for when a complication changes.
-
onLayout(dc as Graphics.Dc) as Void
Load resources for the watch face.
-
onUpdate(dc as Graphics.Dc) as Void
Draw the watch face.
-
updateComplicationText(drawableId as Lang.String, complicationId as Complications.Id) as Void
Update the text of the complication.
-
updateConfiguration(config as WatchFaceConfig.Settings, editedType as WatchUi.WatchFaceConfigType or Null) as Void
Update the configuration of the watch face with the given settings.
Instance Attribute Details
var _accentColor as Lang.Number
The color for the time
var _bottomComplicationId as Complications.Id
The bottom complication
var _complicationColor as Lang.Number
The color for the complications
var _editMode as Lang.Boolean
If the view is in edit mode or not
var _editingComplication as Lang.Boolean
Whether or not a complcation is being edited
var _selectedComplication as Complications.Id or Null
The selected complication when editing
var _style as Lang.Number
The style to display the time in
var _styleString as Lang.String
The format string for the time
var _topComplicationId as Complications.Id
The top complication
Instance Method Details
complicationTapped(drawableId as Lang.String, x as Lang.Number, y as Lang.Number) as Lang.Boolean
Determine if a complication was tapped
getComplication(complication as WatchFaceConfig.ComplicationRef) as WatchUi.ComplicationDrawableRef or Null
Get the complication drawable for the given complication reference
getTappedComplication(x as Lang.Number, y as Lang.Number) as ComplicationLocation.Value or Null
Get the complication tapped at the given coordinates
initialize(editMode as Lang.Boolean)
Constructor
onComplicationChange(id as Complications.Id) as Void
Callback for when a complication changes
onLayout(dc as Graphics.Dc) as Void
Load resources for the watch face
onUpdate(dc as Graphics.Dc) as Void
Draw the watch face
updateComplicationText(drawableId as Lang.String, complicationId as Complications.Id) as Void
Update the text of the complication
updateConfiguration(config as WatchFaceConfig.Settings, editedType as WatchUi.WatchFaceConfigType or Null) as Void
Update the configuration of the watch face with the given settings.