Class: $.AttentionView

Inherits:
WatchUi.View show all

Overview

Shows the options and processes the current action

Constant Summary

Actions

Name Value Since Description
ACTION_BACKLIGHT 0
ACTION_TONE 1
ACTION_VIBRATE 2
ACTION_COUNT 3

Instance Member Summary collapse

Instance Method Summary collapse

Instance Attribute Details

var _backlightOn as Lang.Boolean

var _currentTone as Lang.String or Null

var _currentVibe as Lang.String or Null

var _mainText as Lang.Array<WatchUi.Drawable> or Null

var _selectedIndex as Lang.Number

var _toneIdx as Lang.Number

var _toneNames as Lang.Array<Lang.String>

Instance Method Details

action() as Void

Process the current attention action

decIndex() as Void

Decrement the currently selected option index

incIndex() as Void

Increment the currently selected option index

initialize()

Constructor

loadSong(rezId as Lang.ResourceId) as Lang.Array<Attention.ToneProfile>

Load the song from resources into a tone profile

Parameters:

  • rezId —

    Resource id for the song

Returns:

  • Array of tone profile objects

onHide() as Void

Called when this View is removed from the screen. Save the state of your app here.

onLayout(dc as Graphics.Dc) as Void

Load your resources here

Parameters:

  • dc —

    Device context

onShow() as Void

Restore the state of the app and prepare the view to be shown

onUpdate(dc as Graphics.Dc) as Void

Update the view

Parameters:

  • dc —

    Device Context

setIndexFromYVal(yVal as Lang.Number) as Void

Take a tap coordinate and correspond it to one of three sections

Parameters:

  • yVal —

    Y-coordinate of tap


Generated Jun 9, 2026, 8:45:33 AM