Class: Toybox.Media.CustomButton
- Inherits:
-
Toybox.Lang.Object
Overview
A CustomButton allows for a media player action other than one of the PLAYBACK_CONTROL_* actions. When a CustomButton is pressed in the media player the ContentDelegate.onCustomButton(button) function is called with the pressed button as a parameter.
Instance Method Summary collapse
-
getImage(image as Media.ButtonImage, highlighted as Lang.Boolean) as WatchUi.BitmapResource or Graphics.BitmapReference or Null
Called by the system to draw the button in the Media Player.
-
getState() as Media.ButtonState
Called by the system to determine if the current state of the button.
-
getText(state as Media.ButtonState) as Lang.String or Null
Called by the system to draw the name of the button.
Instance Method Details
getImage(image as Media.ButtonImage, highlighted as Lang.Boolean) as WatchUi.BitmapResource or Graphics.BitmapReference 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.
getState() as Media.ButtonState
Called by the system to determine if the current state of the button
getText(state as Media.ButtonState) as Lang.String or Null
Called by the system to draw the name of the button