Hi, I'm trying to make a watch face for the first time and struggling a bit here with an image I added to the watch face. I want it overall to be an analog watch but right now it is a digital watch but the png file of the picture I added causing the time to dissapear as follows: /resized-image/__size/320x240/__key/communityserver-discussions-components-files/12/pastedimage1631410153505v1.png
TY in advance
I am adding the source View code hopefully the problem will be seen and there's a solution for this situation (I am adding as a text because for some reason I can't add it with an insert>code):
import Toybox.Graphics;
import Toybox.Lang;
import Toybox.System;
import Toybox.WatchUi;
class sharinganView extends WatchUi.WatchFace {
var myBmp;
function initialize() {
WatchFace.initialize();
myBmp=WatchUi.loadResource(Rez.Drawables.sharinganPhoto); //load the bitmap using your id in place of id_pic
}
function onUpdate(dc) {
var x=0,y=0; //upper left is at 10,10
dc.drawBitmap(x, y, myBmp);
}
}
// Load your resources here
function onLayout(dc as Dc) as Void {
setLayout(Rez.Layouts.WatchFace(dc));
}
// Called when this View is brought to the foreground. Restore
// the state of this View and prepare it to be shown. This includes
// loading resources into memory.
function onShow() as Void {
}
// Update the view
function onUpdate(dc as Dc) as Void {
// Get and show the current time
var clockTime = System.getClockTime();
var timeString = Lang.format("$1$:$2$", [clockTime.hour, clockTime.min.format("%02d")]);
var view = View.findDrawableById("TimeLabel") as Text;
view.setText(timeString);
// Call the parent onUpdate function to redraw the layout
View.onUpdate(dc);
}
// Called when this View is removed from the screen. Save the
// state of this View here. This includes freeing resources from
// memory.
function onHide() as Void {
}
// The user has just looked at their watch. Timers and animations may be started here.
function onExitSleep() as Void {
}
// Terminate any active timers and prepare for slow updates.
function onEnterSleep() as Void {
}