04-29-2018 11:59
04-29-2018 11:59
Just started on my watch face for my Versa. I can't get images to display.
For instance:
from the index.gui file
<image id="hrimg" href="hr.png" height="16" width="16" x="240" y="30" />
<text id="myHR" x="270" y="30" />
from the styles.css file
#myHR
{font-size:35;
font-family: System-Bold;
text-length:50;
text-anchor:end;
fill:white;}
hr.png has been copied to the resources folder
myHR displays the text set in index.js
I have no idea why the image isn't displaying. Anyone have some ideas?
Answered! Go to the Best Answer.
04-30-2018 04:16
04-30-2018 04:16
The image is inside the resources folder.
On a lark, I changed them from PNG files to JPG files, and they all started displaying. The simulator still acts a little strange and after few seconds, the images disappear and the digital time gets smushed together, but for now, I think things are working as expected.
Best Answer04-29-2018 12:23
04-29-2018 12:23
Hey @ChicoH - I've run into a similar issue when using .png images for button icons.
A couple of ideas:
1) Your height and width seem quite small (only 16x16 pixels). Try using %'s for the height and width (i.e. 16% and 16% if you want a square image that spans 16% of the watch width and 16% of the watch height).
2) Check to see if there are any requirements for the original size of the image you are trying to display. When I ran into this issue I was using a 512x512 image when I had to use a 60x60 pixel.
Let me know if this helps!
04-30-2018 00:17
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
04-30-2018 00:17
Is the image inside your /resources folder?
Best Answer04-30-2018 04:16
04-30-2018 04:16
The image is inside the resources folder.
On a lark, I changed them from PNG files to JPG files, and they all started displaying. The simulator still acts a little strange and after few seconds, the images disappear and the digital time gets smushed together, but for now, I think things are working as expected.
Best Answer05-06-2019 11:06 - edited 05-06-2019 11:07
05-06-2019 11:06 - edited 05-06-2019 11:07
Just curious... was this on a regular Versa, or Versa Lite?
The exact same code works fine on a Versa, but the images then fail on a Versa Lite. Literally pulling in the exact same files. (PNG).
DERP -- never mind. 2018.. I thought this was from 2019
Best Answer