Device Simulator Label Color

I've followed the official tutorial for the latest SDK version (3.2.3) for a basic watch face. The device simulator always shows the label as red no matter what color I set the value to in the code. Any suggestions?

  • How are you trying to change the color and in which sample?  If you mean where you create a WF from the Template in eclipse, (file>new>Connect IQ Project), the color is defined in layout.xml (it's blue in the template, so not sure why you see red).

  • It's the default new watch face with settings sample project template.

    I changed it in layout.xml and tried various options, but it always shows as red on the simulator.

  • Ok, you used the "with settings" option, and the color is in properties.xml.  You can change the code, or use the app settings editor in eclipse to change it.

    Here's what's in properties:

    <property id="ForegroundColor" type="number">0xFF0000</property>

    Using the app settings editor shows you how that works.  I just changed it to while using that:

  • Thanks. My layout.xml looks a bit different:

    <layout id="WatchFace">
    <drawable class="Background" />
    <label id="TimeLabel" x="center" y="center" font="Graphics.FONT_LARGE" justification="Graphics.TEXT_JUSTIFY_CENTER" color="Graphics.COLOR_WHITE" />
    </layout>

  • The file I referenced isn't layout.xml - it's properties.xml.  It's used for app settings.  App settings are how you can change things (like color) from a phone or Garmin Express (that isn't available for sideloads).  In Eclipse, under the connect IQ Menu, the first item is "App Settings Editor" which allows you to test this in the sim.

  • That worked, thanks :)