Hey,
in my onUpdate() function I am using dc.clear() to remove all elements before I decide in an if-statement which element to show depending on a variable. However, all elements are shown at all times, overlapping each other.
- All elements (bitmaps) are listed in the layout.xml
- The bitmaps are linked to variables (icon1 and icon2) in the onLayout function
- The onUpdate function is triggered successfully (checked with print-statement).
function onUpdate(dc as Dc) as Void {
// Call the parent onUpdate function to redraw the layout
View.onUpdate(dc);
dc.clear();
if (phase == 1) {
_icon1.draw(dc);
}
if (phase == 2) {
_icon2.draw(dc);
}
}
Any advise?
Thanks and have a great day :)