Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Commit

Permalink
update the icons in the food page
Browse files Browse the repository at this point in the history
  • Loading branch information
1zbbxzak1 committed Jun 17, 2023
1 parent 0b30e46 commit a6e8014
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/src/main/java/com/example/trackit/ui/food/FoodPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ fun FoodPage(
Spacer(modifier = Modifier.padding(20.dp))
MealPanel(
mealType = "Завтрак",
mealIcon = R.drawable.breakfast_icon,
mealIcon = if (breakfastUiState.breakfastList.isNotEmpty()) R.drawable.breakfast_icon_green else R.drawable.breakfast_icon,
foods = breakfastUiState.breakfastList,
isExpanded = breakfastExpanded,
onPanelClicked = { breakfastExpanded = !breakfastExpanded },
Expand Down Expand Up @@ -237,7 +237,7 @@ fun FoodPage(
item {
MealPanel(
mealType = "Обед",
mealIcon = R.drawable.lunch_icon,
mealIcon = if (lunchUiState.lunchList.isNotEmpty()) R.drawable.lunch_icon_green else R.drawable.lunch_icon,
foods = lunchUiState.lunchList,
isExpanded = lunchExpanded,
onPanelClicked = { lunchExpanded = !lunchExpanded },
Expand Down Expand Up @@ -266,7 +266,7 @@ fun FoodPage(
item {
MealPanel(
mealType = "Ужин",
mealIcon = R.drawable.dinner_icon,
mealIcon = if (dinnerUiState.dinnerList.isNotEmpty()) R.drawable.dinner_icon_green else R.drawable.dinner_icon,
foods = dinnerUiState.dinnerList,
isExpanded = dinnerExpanded,
onPanelClicked = { dinnerExpanded = !dinnerExpanded },
Expand Down Expand Up @@ -295,7 +295,7 @@ fun FoodPage(
item {
MealPanel(
mealType = "Перекус",
mealIcon = R.drawable.snack_icon,
mealIcon = if (snackUiState.snackList.isNotEmpty()) R.drawable.snack_icon_green else R.drawable.snack_icon,
foods = snackUiState.snackList,
isExpanded = snackExpanded,
onPanelClicked = { snackExpanded = !snackExpanded },
Expand Down
27 changes: 27 additions & 0 deletions app/src/main/res/drawable/breakfast_icon_green.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="50dp"
android:height="50dp"
android:viewportWidth="50"
android:viewportHeight="50">

<path
android:fillColor="#99CD4E"
android:pathData="M26.5,15.25 A1.5,1.5,0,1,0,23.5,15.25 L23.5,16.75 A1.5,1.5,0,1,0,26.5,16.75
L26.5,15.25 Z" />
<path
android:fillColor="#99CD4E"
android:fillType="evenOdd"
android:pathData="M20.542,36.25 L11.5,36.25 A1.5,1.5,0,1,1,11.5,33.25 L17.204,33.25
A9,9,0,1,1,32.795,33.25 L38.5,33.25 A1.5,1.5,0,1,1,38.5,36.25 L20.542,36.25 Z
M25,22.75 A6,6,0,0,0,21.031,33.25 L28.969,33.25 A6,6,0,0,0,25,22.75 Z" />
<path
android:fillColor="#99CD4E"
android:pathData="M35.606,20.265 L34.546,21.325 A1.5,1.5,0,1,1,32.425,19.204 L33.485,18.144
A1.501,1.501,0,0,1,36.065,19.199 A1.501,1.501,0,0,1,35.606,20.265 Z M13,30.25
A1.5,1.5,0,1,0,13,27.25 L11.5,27.25 A1.5,1.5,0,1,0,11.5,30.25 L13,30.25 Z
M40,28.75 A1.5,1.5,0,0,1,38.5,30.25 L37,30.25 A1.5,1.5,0,1,1,37,27.25
L38.5,27.25 A1.5,1.5,0,0,1,40,28.75 Z M15.454,21.325
A1.5,1.5,0,0,0,17.575,19.204 L16.515,18.144 A1.499,1.499,0,1,0,14.395,20.264
L15.454,21.325 Z" />
</vector>
13 changes: 13 additions & 0 deletions app/src/main/res/drawable/dinner_icon_green.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="50dp"
android:height="50dp"
android:viewportWidth="50"
android:viewportHeight="50">

<path
android:fillColor="#99CD4E"
android:strokeColor="#99CD4E"
android:strokeWidth=".5"
android:pathData="M40 30.454a1.364 1.364 0 0 1-1.364 1.364H11.364a1.364 1.364 0 0 1 0-2.727h27.272A1.364 1.364 0 0 1 40 30.454zm-6.818 4.091H16.818a1.364 1.364 0 0 0 0 2.728h16.364a1.364 1.364 0 1 0 0-2.728zM12.727 25a1.363 1.363 0 1 0 2.727 0 9.546 9.546 0 0 1 19.091 0 1.363 1.363 0 1 0 2.728 0 12.272 12.272 0 1 0-24.546 0z" />
</vector>
13 changes: 13 additions & 0 deletions app/src/main/res/drawable/lunch_icon_green.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="50dp"
android:height="50dp"
android:viewportWidth="50"
android:viewportHeight="50">

<path
android:fillColor="#99CD4E"
android:strokeColor="#99CD4E"
android:strokeWidth=".7"
android:pathData="M25 33.625A8.625 8.625 0 1 1 33.625 25 8.639 8.639 0 0 1 25 33.625zm0-15A6.375 6.375 0 1 0 31.375 25 6.39 6.39 0 0 0 25 18.625zM25 14.5a1.14 1.14 0 0 1-1.125-1.125v-2.25a1.125 1.125 0 1 1 2.25 0v2.25A1.14 1.14 0 0 1 25 14.5zM25 40a1.14 1.14 0 0 1-1.125-1.125v-2.25a1.125 1.125 0 1 1 2.25 0v2.25A1.14 1.14 0 0 1 25 40zM38.875 26.125h-2.25a1.124 1.124 0 1 1 0-2.25h2.25a1.125 1.125 0 1 1 0 2.25zM13.375 26.125h-2.25a1.125 1.125 0 1 1 0-2.25h2.25a1.125 1.125 0 1 1 0 2.25zM16.75 17.875A1.11 1.11 0 0 1 16 17.5L14.365 16A1.155 1.155 0 1 1 16 14.365L17.5 16a1.125 1.125 0 0 1 0 1.5 1.11 1.11 0 0 1-0.75 0.375 zM34.84 35.965a1.112 1.112 0 0 1-0.795-0.33L32.5 34a1.126 1.126 0 0 1 1.5-1.5l1.635 1.5a1.124 1.124 0 0 1 0 1.59 1.111 1.111 0 0 1-0.795 0.375 zM33.25 17.875a1.11 1.11 0 0 1-0.75-0.375 1.125 1.125 0 0 1 0-1.5l1.5-1.635A1.156 1.156 0 1 1 35.635 16L34 17.5a1.11 1.11 0 0 1-0.75 0.375 zM15.16 35.965a1.11 1.11 0 0 1-0.795-0.33 1.125 1.125 0 0 1 0-1.59L16 32.5a1.124 1.124 0 0 1 1.5 1.5L16 35.635a1.112 1.112 0 0 1-0.84 0.33 z" />
</vector>
13 changes: 13 additions & 0 deletions app/src/main/res/drawable/snack_icon_green.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="50dp"
android:height="50dp"
android:viewportWidth="50"
android:viewportHeight="50">

<path
android:fillColor="#99CD4E"
android:strokeColor="#99CD4E"
android:strokeWidth=".5"
android:pathData="M39.958 22.648c-0.058-0.555-0.163-1.062-0.39-1.572-0.17-0.381-0.414-0.718-0.631-1.072-0.493-0.799-1.114-1.584-1.923-2.079-0.4-0.244-0.82-0.447-1.241-0.65a9.56 9.56 0 0 0-1.437-0.585c-0.774-0.235-1.58-0.397-2.391-0.397-0.193 0-0.386 0.01 -0.579 0.03 -0.473 0.045 -0.94 0.122 -1.407 0.224 -0.253 0.057 -0.51 0.125 -0.762 0.204 0.012-0.129 0.025 -0.256 0.029 -0.384 0.006 -0.302 0.011 -0.603 0.006 -0.907-0.009-0.358-0.062-0.715-0.113-1.072a7.788 7.788 0 0 1-0.046-0.589 8 8 0 0 0-0.107-0.89 3.219 3.219 0 0 0-0.049-0.262c-0.103-0.406-0.368-0.72-0.772-0.847a0.933 0.933 0 0 0-0.28-0.041c-0.235 0-0.47 0.075 -0.687 0.149 -0.42 0.145 -0.834 0.297 -1.221 0.515 a5.41 5.41 0 0 0-1.188 0.922 c-0.32 0.32 -0.594 0.688 -0.88 1.038-0.092 0.114 -0.181 0.23 -0.273 0.344 a6.245 6.245 0 0 0-0.477-0.691c-0.085-0.113-0.158-0.235-0.237-0.353-0.072-0.108-0.155-0.209-0.239-0.312-0.09-0.122-0.178-0.246-0.267-0.368-0.13-0.177-0.236-0.368-0.358-0.548-0.127-0.19-0.286-0.332-0.51-0.394a0.862 0.862 0 0 0-0.662 0.086 0.868 0.868 0 0 0-0.395 0.513 c-0.056 0.205 -0.04 0.479 0.088 0.66 0.204 0.287 0.427 0.563 0.646 0.84 0.201 0.269 0.373 0.557 0.57 0.83 0.164 0.224 0.313 0.445 0.442 0.691 a7.3 7.3 0 0 1 0.281 0.594 c0.257 0.627 0.489 1.262 0.704 1.905 0.107 0.32 0.197 0.643 0.29 0.966-0.234-0.196-0.458-0.402-0.701-0.586a9.776 9.776 0 0 0-2.738-1.44 12.453 12.453 0 0 0-1.39-0.374c-0.623-0.133-1.248-0.171-1.882-0.178h-0.066c-0.773 0-1.556 0.134 -2.275 0.413 -0.339 0.133 -0.661 0.29 -0.959 0.5 -0.183 0.129 -0.359 0.271 -0.53 0.42 a11.2 11.2 0 0 0-0.598 0.548 c-0.281 0.278 -0.52 0.613 -0.736 0.945 -0.144 0.22 -0.275 0.441 -0.397 0.674 -0.246 0.473 -0.42 0.994 -0.59 1.498-0.163 0.479 -0.309 0.96 -0.406 1.46-0.105 0.543 -0.14 1.106-0.177 1.659-0.065 0.951 -0.07 1.893 0.032 2.842 0.032 0.283 0.07 0.563 0.133 0.837 0.062 0.255 0.133 0.506 0.202 0.757 0.123 0.47 0.246 0.939 0.378 1.407 0.276 0.987 0.603 1.98 1.133 2.86 0.521 0.864 1.122 1.666 1.878 2.339 0.783 0.694 1.603 1.352 2.548 1.812a5.253 5.253 0 0 0 1.56 0.485 c0.523 0.08 1.047 0.127 1.575 0.146 a8.576 8.576 0 0 0 1.721-0.122c0.241-0.041 0.471 -0.12 0.7 -0.208 0.311 -0.122 0.623 -0.263 0.914 -0.428 0.499 -0.286 0.915 -0.706 1.275-1.152 0.194 -0.238 0.373 -0.484 0.544 -0.737 0.495 0.841 1.227 1.487 2.078 1.965a6.9 6.9 0 0 0 1.383 0.579 c0.539 0.163 1.096 0.199 1.653 0.16 0.487-0.035 0.978 -0.096 1.458-0.2 0.557 -0.121 1.088-0.386 1.57-0.69 0.815 -0.515 1.615-1.09 2.32-1.753 0.39 -0.366 0.737 -0.766 1.042-1.205 0.26 -0.376 0.499 -0.762 0.728 -1.158a27.95 27.95 0 0 0 1.212-2.366c0.404-0.871 0.724 -1.788 1.008-2.703 0.263 -0.841 0.53 -1.677 0.695 -2.545 0.185 -0.976 0.27 -1.966 0.171 -2.96zm-15.163-6.816c0.042-0.083 0.092 -0.161 0.145 -0.238 0.2 -0.25 0.41 -0.489 0.63 -0.72 0.163 -0.17 0.317 -0.343 0.494 -0.498 0.333 -0.232 0.7 -0.417 1.071-0.582 0.064 -0.026 0.129 -0.05 0.193 -0.075 0.01 0.136 0.017 0.272 0.024 0.408 0.018 0.332 0.049 0.666 0.062 0.998 0.018 0.56-0.005 1.116-0.065 1.67-0.04 0.24 -0.087 0.484 -0.166 0.714 -0.073 0.14 -0.165 0.268 -0.253 0.399 -0.281 0.223 -0.55 0.464 -0.79 0.73 -0.28 0.312 -0.526 0.654 -0.762 1.001-0.042-0.186-0.082-0.373-0.133-0.557-0.173-0.632-0.396-1.25-0.592-1.876-0.065-0.196-0.12-0.395-0.191-0.59 0.025 -0.049 0.066 -0.086 0.081 -0.14 0.088 -0.213 0.17 -0.43 0.252 -0.643zm13.225 8.962c-0.069 0.416 -0.137 0.831 -0.245 1.24-0.115 0.431 -0.255 0.857 -0.387 1.283a29.845 29.845 0 0 1-0.851 2.39c-0.288 0.655 -0.63 1.291-0.97 1.92a18.726 18.726 0 0 1-1.212 1.964c-0.43 0.521 -0.933 0.974 -1.459 1.396-0.554 0.42 -1.116 0.826 -1.747 1.119a5.336 5.336 0 0 1-0.932 0.22 5.705 5.705 0 0 1-1.099 0.041 4.923 4.923 0 0 1-0.87-0.25 7.043 7.043 0 0 1-1.154-0.663 6.252 6.252 0 0 1-0.674-0.674 5.045 5.045 0 0 1-0.295-0.47c-0.232-0.42-0.765-0.559-1.193-0.378a0.89 0.89 0 0 0-0.257-0.231 0.923 0.923 0 0 0-1.251 0.328 c-0.151 0.25 -0.312 0.492 -0.485 0.728 -0.24 0.296 -0.499 0.573 -0.79 0.82 -0.193 0.133 -0.393 0.24 -0.606 0.34 a4.546 4.546 0 0 1-0.82 0.232 c-0.705 0.057 -1.418 0.018 -2.118-0.063a5.872 5.872 0 0 1-1.14-0.281c-0.486-0.23-0.925-0.523-1.358-0.838a12.389 12.389 0 0 1-1.784-1.722 10.702 10.702 0 0 1-1.04-1.74c-0.258-0.651-0.459-1.314-0.649-1.99-0.109-0.387-0.216-0.773-0.322-1.16-0.09-0.335-0.186-0.665-0.244-1.007a16.225 16.225 0 0 1 0.021-3.795c0.143-0.8 0.39 -1.57 0.69 -2.322 0.2 -0.415 0.434 -0.803 0.706 -1.175 0.27 -0.316 0.585 -0.596 0.91 -0.857 0.206 -0.148 0.421 -0.271 0.65 -0.378 0.308 -0.112 0.623 -0.194 0.945 -0.253a8.481 8.481 0 0 1 1.858 0.018 c0.365 0.065 0.723 0.158 1.083 0.25 0.361 0.09 0.714 0.195 1.06 0.332 0.724 0.317 1.393 0.72 2.028 1.188 0.495 0.402 0.94 0.834 1.35 1.322 0.165 0.235 0.3 0.476 0.417 0.742l-0.01-0.023c0.093 0.204 0.198 0.369 0.407 0.492 a0.962 0.962 0 0 0 0.744 0.097 0.949 0.949 0 0 0 0.407-0.25 0.9 0.9 0 0 0 0.381-0.114c0.221-0.13 0.325 -0.313 0.416 -0.543 0.062 -0.154 0.126 -0.308 0.19 -0.462 0.134 -0.277 0.271 -0.546 0.423 -0.815 0.14 -0.254 0.315 -0.49 0.49 -0.722 0.259 -0.314 0.533 -0.602 0.844 -0.863 0.367 -0.258 0.749 -0.47 1.155-0.66a9.463 9.463 0 0 1 1.892-0.514 6.676 6.676 0 0 1 1.348-0.037c0.626 0.101 1.246 0.263 1.836 0.494 0.322 0.152 0.633 0.325 0.945 0.494 0.313 0.17 0.623 0.345 0.915 0.548 0.27 0.23 0.5 0.494 0.724 0.768 0.19 0.264 0.359 0.537 0.521 0.819 0.157 0.265 0.323 0.522 0.457 0.8 0.074 0.206 0.127 0.415 0.165 0.63 0.037 0.368 0.056 0.735 0.06 1.106a8 8 0 0 1-0.076 1.129zm-1.507-1.846c0.085 0.357 0.133 0.73 0.158 1.096 0.013 0.197 0.008 0.392-0.01 0.591 -0.05 0.518 -0.182 1.02-0.291 1.528-0.085 0.4 -0.202 0.793 -0.317 1.187-0.117 0.397 -0.266 0.785 -0.395 1.18-0.101 0.317 -0.199 0.637 -0.343 0.938 -0.12 0.251 -0.256 0.495 -0.37 0.75 -0.082 0.199 -0.164 0.396 -0.25 0.592 -0.116 0.27 -0.47 0.428 -0.743 0.428 a0.867 0.867 0 0 1-0.611-0.253c-0.32-0.322-0.345-0.9 0-1.216l0.035-0.034c0.066-0.106 0.118 -0.217 0.175 -0.328 0.112 -0.218 0.217 -0.44 0.318 -0.663 0.14 -0.36 0.233 -0.737 0.356 -1.101 0.106 -0.314 0.21 -0.63 0.297 -0.946 0.182 -0.658 0.358 -1.33 0.464 -2.003a4.8 4.8 0 0 0-0.024-1.007 3.203 3.203 0 0 0-0.137-0.53c-0.092-0.198-0.198-0.39-0.324-0.568-0.135-0.163-0.278-0.322-0.413-0.485-0.15-0.181-0.249-0.357-0.249-0.598a0.847 0.847 0 0 1 0.844-0.845c0.204 0 0.468 0.082 0.598 0.247 0.182 0.228 0.353 0.465 0.532 0.697 l-0.094-0.12c0.344 0.44 0.661 0.912 0.794 1.463z" />
</vector>

0 comments on commit a6e8014

Please sign in to comment.