Class: Toybox.Media.SystemButton

Overview

A SystemButton allows an app to override a default media player button. The button can be overridden by providing a new Toybox::WatchUi::BitmapResource, Toybox::Graphics::BitmapReference or a Toybox::Lang::Number representing a 24-bit RRGGBB color value. If a color value is provided then the system default button will be used but will drawn using the given color.

Note:

BitmapReference is only supported in CIQ 4.0.0 and later

Since:

API Level 3.0.3

Instance Method Summary collapse

Instance Method Details

getImage(image as Media.ButtonImage, state as Media.ButtonState, highlighted as Lang.Boolean) as Graphics.BitmapType or Graphics.ColorType or Null

Called by the system to draw the button in the Media Player

Note:

BitmapReference is only supported in CIQ 4.0.0 and later

Parameters:

  • image(Media.ButtonImage)

    A BUTTON_IMAGE_* value

  • state(Media.ButtonState)

    A BUTTON_STATE_* value indicating the current state of the button

  • highlighted(Lang.Boolean)

    Set to true if the button is highlighted, otherwise false

Returns:

Since:

API Level 3.0.3

initialize(type as Media.PlaybackControl, options as { :disabled as Lang.Boolean } or Null)

Constructor

Parameters:

Since:

API Level 3.0.3


Generated Sep 23, 2024, 3:32:49 PM