Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

Commit

Permalink
Updated to latest SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
gomezfr committed May 9, 2019
1 parent ef54cfb commit 39c5e5c
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 24 deletions.
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>digital-watch-cas10</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>connectiq.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>connectiq.projectNature</nature>
</natures>
</projectDescription>
52 changes: 37 additions & 15 deletions manifest.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,41 @@
<!-- This is a generated file. It is highly recommended that you DO NOT edit
this file. --><iq:manifest xmlns:iq="http://www.garmin.com/xml/connectiq" version="1">
<iq:application entry="DigitalWatchApp" id="DB8F0FCBF99744C7847080C901937D60" launcherIcon="@Drawables.LauncherIcon" name="@Strings.AppName" type="watchface">

<iq:products>
<iq:product id="round_watch"/>
<!-- This is a generated file. It is highly recommended that you DO NOT edit this file. --><iq:manifest xmlns:iq="http://www.garmin.com/xml/connectiq" version="1">
<iq:application entry="DigitalWatchApp" id="DB8F0FCBF99744C7847080C901937D60" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="1.2.0" name="@Strings.AppName" type="watchface">
<iq:products>
<iq:product id="approachs60"/>
<iq:product id="d2bravo"/>
<iq:product id="d2bravo_titanium"/>
<iq:product id="d2charlie"/>
<iq:product id="d2delta"/>
<iq:product id="d2deltapx"/>
<iq:product id="d2deltas"/>
<iq:product id="descentmk1"/>
<iq:product id="fenix3"/>
<iq:product id="fenix3_hr"/>
<iq:product id="fenix5"/>
<iq:product id="fenix5plus"/>
<iq:product id="fenix5s"/>
<iq:product id="fenix5splus"/>
<iq:product id="fenix5x"/>
<iq:product id="fenix5xplus"/>
<iq:product id="fenixchronos"/>
<iq:product id="fr935"/>
<iq:product id="fr945"/>
<iq:product id="marqathlete"/>
<iq:product id="marqaviator"/>
<iq:product id="marqcaptain"/>
<iq:product id="marqdriver"/>
<iq:product id="marqexpedition"/>
<iq:product id="vivoactive3"/>
<iq:product id="vivoactive3d"/>
<iq:product id="vivoactive3m"/>
<iq:product id="vivoactive3mlte"/>
<iq:product id="vivoactive_hr"/>
<iq:product id="vivolife"/>
</iq:products>

<iq:permissions/>

<iq:languages>
<iq:language>eng</iq:language>
<iq:language>spa</iq:language>
</iq:languages>

</iq:application>
<iq:permissions/>
<iq:languages>
<iq:language>eng</iq:language>
<iq:language>spa</iq:language>
</iq:languages>
</iq:application>
</iq:manifest>
1 change: 1 addition & 0 deletions monkey.jungle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
project.manifest = manifest.xml
14 changes: 7 additions & 7 deletions source/DigitalWatchApp.mc
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
using Toybox.Application as App;
using Toybox.Application;

class DigitalWatchApp extends App.AppBase {
class DigitalWatchApp extends Application.AppBase {

function initialize() {
AppBase.initialize();
}

//! onStart() is called on application start up
function onStart() {
// onStart() is called on application start up
function onStart(state) {
}

//! onStop() is called when your application is exiting
function onStop() {
// onStop() is called when your application is exiting
function onStop(state) {
}

//! Return the initial view of your application here
// Return the initial view of your application here
function getInitialView() {
return [ new DigitalWatchView() ];
}
Expand Down
5 changes: 3 additions & 2 deletions source/DigitalWatchView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class DigitalWatchView extends Ui.WatchFace {
WatchFace.initialize();
}

//! Load your resources here
// Load your resources here
function onLayout(dc) {
font = Ui.loadResource(Rez.Fonts.id_font_digital);
font2 = Ui.loadResource(Rez.Fonts.id_font_digital_sec);
Expand Down Expand Up @@ -94,11 +94,12 @@ class DigitalWatchView extends Ui.WatchFace {

function drawDate(dc, dayStr, monthStr, dayWeekStr){
//Draw Date

dc.setColor(Gfx.COLOR_BLACK, Gfx.COLOR_TRANSPARENT);
dc.drawText(dc.getWidth()-30, 4*(dc.getHeight()/6)+6, font3, dayStr, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(dc.getWidth()-62, 4*(dc.getHeight()/6)+8, Gfx.FONT_SMALL, "-", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(dc.getWidth()-70, 4*(dc.getHeight()/6)+6, font3, monthStr, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(50, 4*(dc.getHeight()/6)+6, font3, dayWeekStr.toLower(), Gfx.TEXT_JUSTIFY_LEFT);
dc.drawText((dc.getWidth()-80)/2, 4*(dc.getHeight()/6)+6, font3, dayWeekStr.toLower(), Gfx.TEXT_JUSTIFY_CENTER);
}

function drawTime(dc, hour, minute){
Expand Down

0 comments on commit 39c5e5c

Please sign in to comment.