Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed resources-fenix3/images/car_icon.png
Binary file not shown.
Binary file removed resources-fenix3/images/launcher_icon.png
Binary file not shown.
2 changes: 1 addition & 1 deletion resources-fenix3/layouts/main_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<layouts>
<layout id="MainLayout">
<label x="center" y="45" text="Commute Tracker" color="Gfx.COLOR_WHITE" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_MEDIUM"/>
<bitmap id="id_car" x="center" y="center" filename="../images/car_icon.png" />
<bitmap id="id_car" x="center" y="center" filename="../../resources/images/car_icon.png" />
<label x="center" y="135" text="Press any Key" color="Gfx.COLOR_WHITE" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_TINY"/>
</layout>
</layouts>
Expand Down
5 changes: 0 additions & 5 deletions resources-fenix3/menus/activity_menu.xml

This file was deleted.

4 changes: 0 additions & 4 deletions resources-fenix3/menus/menu.xml

This file was deleted.

4 changes: 2 additions & 2 deletions resources-fenix3/resources.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<resources>
<string id="AppName">CommuteTracker</string>

<bitmap id="LauncherIcon" filename="images/launcher_icon.png" />
<bitmap id="id_car" filename="images/car_icon.png" />
<bitmap id="LauncherIcon" filename="../resources/images/launcher_icon.png" />
<bitmap id="id_car" filename="../resources/images/car_icon.png" />

<!-- Parameters for drawing the history chart on the fenix-3 -->
<string id="chart_bar_base_y">58</string>
Expand Down
32 changes: 32 additions & 0 deletions resources-round/drawables/drawables.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<resources>
<drawables>
<drawable-list id="black_background">
<shape type="rectangle" color="Gfx.COLOR_BLACK" x="0" y="0" width="fill" height="fill" />
</drawable-list>
<drawable-list id="white_background">
<shape type="rectangle" color="Gfx.COLOR_WHITE" x="0" y="0" width="fill" height="fill" />
</drawable-list>
<drawable-list id="history_detail_title_bar">
<shape type="rectangle" color="Gfx.COLOR_DK_BLUE" x="0" y="60" width="fill" height="5" />
</drawable-list>
<drawable-list id="summary_title_bar">
<shape type="rectangle" color="Gfx.COLOR_DK_BLUE" x="0" y="60" width="fill" height="5" />
</drawable-list>
<drawable-list id="gray_horizontal_center_bar">
<shape type="rectangle" color="Gfx.COLOR_DK_GRAY" x="0" y="center" width="fill" height="10" />
</drawable-list>
<drawable-list id="gray_vertical_center_half_bar">
<shape type="rectangle" color="Gfx.COLOR_DK_GRAY" x="center" y="0" width="5" height="120" />
</drawable-list>

<drawable-list id="chart_axes">
<!-- Vertical axis -->
<shape type="rectangle" color="Gfx.COLOR_WHITE" x="60" y="55" width="2" height="100" />

<!-- Horizontal axis -->
<shape type="rectangle" color="Gfx.COLOR_WHITE" x="61" y="153" width="140" height="2" />

</drawable-list>

</drawables>
</resources>
27 changes: 27 additions & 0 deletions resources-round/layouts/commute_activity_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<resources>
<layouts>
<layout id="CommuteActivityLayout">
<drawable id="white_background" />

<!-- Draw the dividing lines for the timer -->
<drawable id="gray_horizontal_center_bar" />
<drawable id="gray_vertical_center_half_bar" />

<!-- Display the time moving in upper left corner -->
<label x="65" y="45" text="Move Time" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_XTINY"/>
<label id="move_time" x="65" y="60" color="Gfx.COLOR_DK_GREEN" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_NUMBER_MILD"/>

<!-- Display the time stopped in upper right corner -->
<label x="170" y="45" text="Stop Time" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_XTINY"/>
<label id="stop_time" x="170" y="60" color="Gfx.COLOR_DK_RED" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_NUMBER_MILD"/>

<!-- Display the total time in the lower half -->
<label x="center" y="140" text="Total Time" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_XTINY"/>
<label id="total_time" x="center" y="160" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_NUMBER_MEDIUM"/>

<!-- Display message if GPS is bad -->
<label id="wait_for_gps" x="center" y="200" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_XTINY"/>

</layout>
</layouts>
</resources>
32 changes: 32 additions & 0 deletions resources-round/layouts/commute_summary_page_one_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<resources>
<layouts>
<layout id="CommuteSummaryPageOneLayout">
<drawable id="white_background" />

<!-- Draw the heading with a bar underneath -->
<label id="commute_start_time" x="center" y="30" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_MEDIUM"/>
<drawable id="summary_title_bar" />

<!-- Total Commute Time -->
<label x="15" y="65" text="Total Time" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="total_commute_time" x="215" y="65" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

<!-- Time Moving -->
<label x="15" y="85" text="Time Moving" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="move_time" x="215" y="85" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

<!-- Time Stopped -->
<label x="15" y="105" text="Time Stopped" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="stop_time" x="215" y="105" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

<!-- Number of Stops -->
<label x="15" y="125" text="Stops" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="num_stops" x="215" y="125" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

<!-- Efficiency -->
<label x="15" y="145" text="Efficiency" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="efficiency" x="215" y="145" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

</layout>
</layouts>
</resources>
28 changes: 28 additions & 0 deletions resources-round/layouts/commute_summary_page_two_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<resources>
<layouts>
<layout id="CommuteSummaryPageTwoLayout">
<drawable id="white_background" />

<!-- Draw the heading with a bar underneath -->
<label id="commute_start_time" x="center" y="30" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_MEDIUM"/>
<drawable id="summary_title_bar" />

<!-- Distance -->
<label x="10" y="65" text="Distance" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="distance" x="215" y="65" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

<!-- Average Speed -->
<label x="10" y="90" text="Avg Speed" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="avg_speed" x="215" y="90" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

<!-- Average Moving Speed -->
<label x="10" y="115" text="Avg Move Speed" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="avg_moving_speed" x="215" y="115" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

<!-- Max Speed -->
<label x="10" y="140" text="Max Speed" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="max_speed" x="215" y="140" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

</layout>
</layouts>
</resources>
24 changes: 24 additions & 0 deletions resources-round/layouts/history_chart_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<resources>
<layouts>
<layout id="HistoryChartLayout">
<drawable id="black_background" />
<label text="Commute Efficiency" x="120" y="25" color="Gfx.COLOR_WHITE" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_XTINY"/>

<drawable id="chart_axes" />

<!-- Horizontal Axis Labels -->
<label text="0" x="60" y="153" color="Gfx.COLOR_WHITE" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>
<label text="50" x="130" y="153" color="Gfx.COLOR_WHITE" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>
<label text="100" x="199" y="153" color="Gfx.COLOR_WHITE" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

<!-- Vertical Axis Labels -->
<label id="bar_label_0" text="9:55a" x="15" y="50" color="Gfx.COLOR_WHITE" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="bar_label_1" text="9:55a" x="15" y="67" color="Gfx.COLOR_WHITE" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="bar_label_2" text="9:55a" x="15" y="84" color="Gfx.COLOR_WHITE" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="bar_label_3" text="9:55a" x="15" y="101" color="Gfx.COLOR_WHITE" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="bar_label_4" text="9:55a" x="15" y="118" color="Gfx.COLOR_WHITE" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="bar_label_5" text="10:55a" x="15" y="135" color="Gfx.COLOR_WHITE" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>

</layout>
</layouts>
</resources>
44 changes: 44 additions & 0 deletions resources-round/layouts/history_detail_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<resources>
<layouts>
<layout id="HistoryDetailLayout">
<drawable id="white_background" />

<!-- Draw the heading with a bar underneath -->
<label id="commute_start_time" x="center" y="40" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_XTINY"/>
<drawable id="history_detail_title_bar" />

<!-- Number of Commutes -->
<label x="20" y="65" text="Commutes" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="num_commutes" x="215" y="65" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

<!-- Average Commute Time -->
<label x="20" y="80" text="Avg Time" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="avg_commute_time" x="215" y="80" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

<!-- Average Time Moving -->
<label x="20" y="95" text="Avg Time Moving" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="avg_move_time" x="215" y="95" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

<!-- Average Time Stopped -->
<label x="20" y="110" text="Avg Time Stopped" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="avg_stop_time" x="215" y="110" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

<!-- Average Distance Traveled -->
<label x="20" y="125" text="Avg Distance" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="avg_distance" x="215" y="125" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

<!-- Max Speed -->
<label x="20" y="140" text="Max Speed" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="max_speed" x="215" y="140" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

<!-- Average Number of Stops -->
<label x="20" y="155" text="Avg Stops" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="avg_stops" x="215" y="155" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

<!-- Average Efficiency -->
<label x="20" y="170" text="Avg Efficiency" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_LEFT" font="Gfx.FONT_XTINY"/>
<label id="avg_efficiency" x="215" y="170" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_RIGHT" font="Gfx.FONT_XTINY"/>

</layout>
</layouts>
</resources>
14 changes: 14 additions & 0 deletions resources-round/layouts/history_detail_no_data_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<resources>
<layouts>
<layout id="HistoryDetailNoDataLayout">
<drawable id="white_background" />

<!-- Draw the heading with a blue bar underneath -->
<label id="commute_start_time" x="center" y="40" text="Commute History" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_XTINY"/>
<drawable id="history_detail_title_bar" />

<label x="center" y="center" text="No Data" color="Gfx.COLOR_BLACK" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_MEDIUM"/>

</layout>
</layouts>
</resources>
9 changes: 9 additions & 0 deletions resources-round/layouts/main_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<resources>
<layouts>
<layout id="MainLayout">
<label x="center" y="60" text="Commute Tracker" color="Gfx.COLOR_WHITE" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_MEDIUM"/>
<bitmap id="id_car" x="center" y="center" filename="../../resources/images/car_icon.png" />
<label x="center" y="135" text="Press any Key" color="Gfx.COLOR_WHITE" justification="Gfx.TEXT_JUSTIFY_CENTER" font="Gfx.FONT_TINY"/>
</layout>
</layouts>
</resources>
18 changes: 18 additions & 0 deletions resources-round/resources.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<resources>
<string id="AppName">CommuteTracker</string>

<bitmap id="LauncherIcon" filename="../resources/images/launcher_icon.png" />
<bitmap id="id_car" filename="../resources/images/car_icon.png" />

<!-- Parameters for drawing the history chart -->
<string id="chart_bar_base_y">58</string>
<string id="chart_bar_base_x">62</string>
<string id="chart_bar_spacing">17</string>
<string id="chart_bar_max_width">140</string>
<string id="chart_bar_height">5</string>

<!-- Parameters for drawing the bar that indicates efficiency on the commute activity view -->
<string id="efficiency_bar_y">115</string>
<string id="efficiency_bar_height">10</string>

</resources>
4 changes: 0 additions & 4 deletions source/CommuteActivity.mc
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,6 @@ module CommuteActivity {
}
}

function isMoving() {
return isMoving;
}

function hasGPSFix() {
return isValidGPS;
}
Expand Down
4 changes: 2 additions & 2 deletions source/CommuteTrackerApp.mc
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ using CommuteActivity as CommuteActivity;
class CommuteTrackerApp extends App.AppBase {

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

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

//! Return the initial view of your application here
Expand Down