Hi, how do I make sure that the current day of the week is displayed in an ellipse?
Has anyone handled something like this?
Thank you.
Hi, how do I make sure that the current day of the week is displayed in an ellipse?
Has anyone handled something like this?
Thank you.
it works perfectly thank you very much, I still need to know if this code can be modified to display days side by side and not below each other and if it is possible:
1. Current day only = red thick font in ellipse
2. Other days transparent color
Thank you so much for your time and help.
This is the last change, I promise...;-)
I'll leave that as an exercise for you to work out. If you're still having trouble you need to go back to basics and play around and read the examples and tutorials.
Hint: Look at where the colour is set in the code. You simply need to set it to the right colour the line before you draw the text/ellipse so it draws in that colour.
To lay them out sideways you need to change one or two lines of code so that yPosition remains the same and xPosition varies.
If you share what code you tried and you genuinely can't get it working post it back here.
I'd like to help, but you'll learn a lot more from trying some things and helping yourself
David
Hi,
I hope you made some progress. Just to let you know I tried this out and am happy to share, however, putting the days along the screen doesn't really give enough space to have every day in its own space.
https://www.dropbox.com/s/ytz2mndoatxq22f/ExampleDaysOfWeek%20%283%29.zip?dl=0
see what you think and good luck.
If you think this answers your question please mark this answer as the answer.
Thanks
Hi David...
Thank you for the source code and interest.
At this point, I can't do everything to make sure that all days of the week are displayed correctly and the positions are nicely adjusted.
I think I should do more to understand the meaning and functionality.
It's quite complicated because my watch has a resolution of 260x260 px.
And I know you don't want to help me anymore, so I have to do it by trial and error.
Edit:
David, can't we write private messages like this?
I don't want to flood this forum here ;)
Hi,
I suggest playing with the code by adjusting some of the numbers /constants and seeing what happens.
You'll need to spend the time to understand what it's doing otherwise you won't be able to make changes yourself or make it better.
Good luck!
Here's a follow-up thread, for the benefit of anyone following this thread: forums.garmin.com/.../
There's a couple of bug fixes for the following issues:
1) Week list starts on Monday for some time zones (UTC, UTC+1, etc.), Sunday for other time zones (UTC-1, ...)
2) Assuming the week list starts on Monday, if the current day is Sunday, then the empty space above Monday will be highlighted, instead of Sunday.
Hi, I want to ask how can I redesign the code to make Saturday blue and Sunday red?
Thank you.
if(dayOfWeekNumber == ("6") || dayOfWeekNumber == ("7")) {
name.setColor(Graphics.COLOR_BLUE);
} else {
name.setColor(Graphics.COLOR_RED);
}
}function drawDay(dc, position, date){
var name = Time.Gregorian.utcInfo(date, Time.FORMAT_MEDIUM).day_of_week.substring(0,2).toUpper();
dc.setPenWidth(2);
dc.setColor($.colorDayOfWeek, Graphics.COLOR_TRANSPARENT);
if (dayOfWeekNumber == 6 || dayOfWeekNumber == 7) {
name.setColor(Graphics.COLOR_BLUE);
} else {
name.setColor(Graphics.COLOR_RED);
}
dc.drawText( position * xSpacing * dc.getWidth()+27, daysY * dc.getHeight(), fontDayOfWeek, name, Graphics.TEXT_JUSTIFY_CENTER|Graphics.TEXT_JUSTIFY_VCENTER);
}
Hi it doesn't work yet.