-
Notifications
You must be signed in to change notification settings - Fork 0
/
CalorieTabbedPage.xaml
250 lines (175 loc) · 7.26 KB
/
CalorieTabbedPage.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<?xml version="1.0" encoding="utf-8"?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:forms="clr-namespace:Microcharts.Forms;assembly=Microcharts.Forms"
x:Class="CalorieCounter.CalorieTabbedPage">
<!--Pages can be added as references or inline-->
<ContentPage Title = "Add" BackgroundColor="NavajoWhite" IconImageSource="addcamera.png">
<StackLayout>
<Image x:Name="Logo"
Margin="10,5,0,0"
Source="creepylogo.png"
HeightRequest="75"
HorizontalOptions="Start"
/>
<Label Text="CalorieCounter"
Margin="0, 10, 0, 15"
HorizontalTextAlignment="Center"
FontSize="40"
TextColor="Navy"
FontAttributes="Bold"
/>
<ImageButton Source="addimage.png"
x:Name = "DishImageButton"
HorizontalOptions="Center"
HeightRequest="150"
Margin="0,5,0,0"
Clicked="Button_Clicked"
/>
<Entry Placeholder="Dish Name"
FontAttributes="Bold"
HorizontalTextAlignment="Center"
x:Name = "DishNameEntry"
TextColor="White"
BackgroundColor="Navy"
Margin="50,20,50,15"
HeightRequest="50"
/>
<Button Text="Add Dish"
x:Name="AddDishButton"
FontAttributes="Bold"
TextColor="White"
BackgroundColor="Navy"
HorizontalOptions="Center"
HeightRequest="50"
WidthRequest="315"
Margin="0, 5, 0, 50"
Clicked="AddDishButton_Clicked" />
<Label Text="Ingredients:"
HorizontalOptions="Center"
FontSize="25"
FontAttributes="Bold"
TextColor="Navy"
FontFamily="TimesNewRoman"
/>
<ListView x:Name="ListOfFoodListView" Margin="25, 0, 25, 25">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding name}" Detail="{Binding calorieCount}"/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ContentPage>
<ContentPage Title="View" BackgroundColor="NavajoWhite" IconImageSource="viewfood.png">
<StackLayout BackgroundColor="NavajoWhite">
<Label Text="Food Eaten:"
Margin="0, 75, 0, 15"
HorizontalTextAlignment="Center"
FontSize="40"
TextColor="Navy"
FontAttributes="Bold" />
<ListView x:Name="DishesEatenListView" Margin="40, 0, 40,0" >
<ListView.ItemTemplate>
<DataTemplate>
<ImageCell Text="{Binding name}" Detail="{Binding caloriesInDish}" ImageSource="{Binding imageSrc} "/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<Label Text="Total Calories:"
HorizontalTextAlignment="Center"
Margin="0, 0, 0, 0"
TextColor="Navy"
FontSize="30"
FontAttributes="Bold"
/>
<Label Text="0"
x:Name="DisplayCaloriesLabel"
HorizontalTextAlignment="Center"
Margin="0, 0, 0, 75"
TextColor="Navy"
FontSize="30"
FontAttributes="Bold"
/>
<Image Source="displayfoods.png"
HeightRequest="200"
Margin="0, 0 ,0 , 70"
/>
</StackLayout>
</ContentPage>
<ContentPage BackgroundColor = "NavajoWhite" xmlns:forms="clr-namespace:Microcharts.Forms;assembly=Microcharts.Forms" Title="Stats" IconImageSource="viewstats.png">
<StackLayout>
<Label Text="Calories Throughout The Week:"
HorizontalTextAlignment="Center"
Margin="0, 50, 0, 0"
TextColor="Navy"
FontSize="30"
FontAttributes="Bold"
/>
<forms:ChartView HeightRequest="175"
x:Name="Days"
/>
<Entry Placeholder="Log Your Steps for the Day!"
HorizontalTextAlignment="Center"
FontSize="16"
FontAttributes="Bold"
BackgroundColor="Navy"
TextColor="White"
Margin="20, 20, 20, 0"
HeightRequest="50"
x:Name="steps"
/>
<Button Text="Submit"
x:Name="SubmitStepsButton"
FontAttributes="Bold"
TextColor="Navy"
BackgroundColor="White"
HorizontalOptions="Center"
HeightRequest="50"
WidthRequest="315"
Margin="0, 5, 0, 50"
Clicked="SubmitStepsButton_Clicked"
/>
<Label Text="Net Calories:"
HorizontalTextAlignment="Center"
TextColor="Navy"
Margin="20, 0, 20, 0"
FontSize="33"
FontAttributes="Bold"
/>
<forms:ChartView HeightRequest="175"
x:Name="CaloricGain"
/>
<Label Text="Net Calories Today:"
HorizontalTextAlignment="Center"
FontSize="20"
TextColor="Navy"
x:Name="NetCaloriesTodayLabel"
/>
</StackLayout>
</ContentPage>
<ContentPage Title="Explore" BackgroundColor="NavajoWhite" IconImageSource="exploreicon.png">
<StackLayout>
<Label Text="Healthy Alternatives:"
FontSize="30"
HorizontalOptions="Center"
FontAttributes="Bold"
Margin="0, 75, 0, 0"
TextColor="Navy"/>
<StackLayout Orientation="Horizontal">
<Image Margin = "25 , 40, 0, 25" Source="frittata.png" HeightRequest="150" />
<Label Margin = "20,95, 0, 0" Text="Vegetable Frittata"
FontSize="25"
TextColor="Navy"/>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Image Margin = "25, 40, 0, 25" Source="flowerrice.png" HeightRequest="150"/>
<Label Margin="30, 95, 0, 0" Text="Cauliflower Rice" FontSize="25" TextColor="Navy"/>
</StackLayout>
<StackLayout Orientation="Horizontal">
<Image Margin = "25, 40, 0, 25" Source="quesadilla.png" HeightRequest="150"/>
<Label Margin="30, 95, 0, 0" Text="Vegetable Quesadilla" FontSize="25" TextColor="Navy"/>
</StackLayout>
</StackLayout>
</ContentPage>
</TabbedPage>