Class: $.ConfigurationWatchFaceView

Inherits:
WatchUi.WatchFace show all

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

Instance Method Summary collapse

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

Parameters:

  • drawableId —

    The id of the drawable to check

  • x —

    The x coordinate of the tap

  • y —

    The y coordinate of the tap

getComplication(complication as WatchFaceConfig.ComplicationRef) as WatchUi.ComplicationDrawableRef or Null

Get the complication drawable for the given complication reference

Parameters:

  • complication —

    The complication reference to get the drawable for

getTappedComplication(x as Lang.Number, y as Lang.Number) as ComplicationLocation.Value or Null

Get the complication tapped at the given coordinates

Parameters:

  • x —

    The x coordinate of the tap

  • y —

    The y coordinate of the tap

initialize(editMode as Lang.Boolean)

Constructor

Parameters:

  • editMode —

    If the view is in edit mode or not

onComplicationChange(id as Complications.Id) as Void

Callback for when a complication changes

Parameters:

  • id —

    The id of the complication that changed

onLayout(dc as Graphics.Dc) as Void

Load resources for the watch face

Parameters:

  • dc —

    The drawing context

onUpdate(dc as Graphics.Dc) as Void

Draw the watch face

Parameters:

  • dc —

    The drawing context

updateComplicationText(drawableId as Lang.String, complicationId as Complications.Id) as Void

Update the text of the complication

Parameters:

  • drawableId —

    The layout id of the drawable to update

  • complicationId —

    The id of the complication to get from the system

updateConfiguration(config as WatchFaceConfig.Settings, editedType as WatchUi.WatchFaceConfigType or Null) as Void

Update the configuration of the watch face with the given settings.

Parameters:

  • config —

    The settings to update the watch face with

  • editedType —

    The type of configuration that changed. Will be null if the configuration is being initialized


Generated Oct 20, 2026, 8:20:32 AM