1. I added a few png's under resources/drawables/images (only trying to add just one of them for now)
2. Under resources/drawables/drawables.xml I added:
<drawables>
<bitmap id="LauncherIcon" filename="launcher_icon.png" />
<bitmap id="MiddleMonkeyPNG" filename="images/middlemonkey.png" />
</drawables>
3. Under resources/layouts/layout.xml, I added the bitmap id so it should draw it be4 the label:
<layout id="TwelveMonkeysWatchFace">
<drawable id="MiddleMonkeyPNG" />
<label id="TimeLabel" x="center" y="center" font="Gfx.FONT_LARGE" justification="Gfx.TEXT_JUSTIFY_CENTER" color="Gfx.COLOR_BLUE" />
</layout>
4. I wasn't sure if thats all that is needed to just add a bitmap to the layout... I still get the error below.
but I also tried to manually add it via onLayout(), like so as I wasn't sure if this is a needed step:
function onLayout(dc) {
var image = Ui.loadResource( Rez.Drawables.MiddleMonkeyPNG );
dc.drawBitmap( 0, 0, image );
setLayout(Rez.Layouts.TwelveMonkeysWatchFace(dc));
}
Seems valid, but I'm getting this error:
#############
...
Copying file.... 95% complete
Copying file.... 97% complete
Copying file.... 100% complete
File pushed successfully
Connection Finished
Closing shell and port
Found Transport: tcp
Connecting...
Connecting to device...
Device Version 0.1.0
Device id 1 name "A garmin device"
Shell Version 0.1.0
Failed invoking <symbol>
UnexpectedTypeException: Expected Class definition, given Number
TwelveMonkeysWatchFace in Rez:25
onLayout in C:\dev\workspace\eclipse-luna-workspace\my-watchface\source\monkwatchfaceView.mc:27
Unhandled Exception
Connection Finished
Closing shell and port
#############
Line 27 is the: setLayout(Rez.Layouts.TwelveMonkeysWatchFace(dc));