dc.setColor(Colors…
...
- Use string resources instead of strings
[/LIST]
...
var topGridLineY =
round240 ? 80 :
round218 ? 73 :
semiRound215 ? 60 :
0;
dc.setColor(Colors.icons,Gfx.COLOR_TRANSPARENT);
dc.drawText(x,y,iconFont,"AP", Gfx.TEXT_JUSTIFY_RIGHT); //Alarm and phone icons in my font
I’ll add my 5 cents if it’s still relevant to someone. This has already been mentioned here, but not so explicitly. At least, I did not immediately notice this. Perhaps because I'm not quite a programmer, I had fun at my leisure. I mean: Do not use CONST variables !!!
Replace the type lines in the code: TEXT_JUSTIFY_CENTER, FONT_NUMBER_MILD, COLOR_DK_RED and so on with their direct numerical values and you will save some more memory.
For example:
dc.setColor (Gfx.COLOR_DK_RED, Gfx.COLOR_TRANSPARENT);
dc.setColor (0xFF0000, -1);