using Toybox.Graphics as Gfx;
using Toybox.Application as App;
//Global variables
var numColor = Gfx.COLOR_RED;
class <appname> extends App.AppBase
in drawable xml:
<shape type="rectangle" x="0" y="0" width="100" height="61" color="$.numColor" />
Here is the error:
BUILD: ERROR: Rez:56: mismatched input 'x' expecting {<list of all operators>}
BUILD: WARNING: Attribute 'color' in ID '' has an invalid value '$.numColor'
The goal is to have a dynamic color and when the View.onUpdate() is called, it changes. would it be better to use x.setColor() ?