1
0
mirror of https://github.com/dzeiocom/OpenHealth.git synced 2025-05-27 18:59:54 +00:00
OpenHealth/app/src/main/res/layout/fragment_food_home.xml

180 lines
6.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/previous"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_baseline_chevron_left_24"/>
<TextView
android:id="@+id/date"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_gravity="center"
android:text="2022-12-24" />
<ImageView
android:id="@+id/next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_baseline_chevron_right_24"/>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Total" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Energy" />
<TextView
android:id="@+id/energy_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textAlignment="textEnd"
android:text="250 / 2594 kcal" />
</LinearLayout>
<ProgressBar
android:layout_width="match_parent"
android:id="@+id/energy_bar"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_height="wrap_content"
android:progress="24"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Proteins" />
<TextView
android:id="@+id/proteins_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textAlignment="textEnd"
android:text="250 / 2594 kcal" />
</LinearLayout>
<ProgressBar
android:layout_width="match_parent"
android:id="@+id/proteins_bar"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_height="wrap_content"
android:progress="24"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Carbs" />
<TextView
android:id="@+id/carbs_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textAlignment="textEnd"
android:text="250 / 2594 kcal" />
</LinearLayout>
<ProgressBar
android:layout_width="match_parent"
android:id="@+id/carbs_bar"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_height="wrap_content"
android:progress="24"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Fat" />
<TextView
android:id="@+id/fat_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textAlignment="textEnd"
android:text="250 / 2594 kcal" />
</LinearLayout>
<ProgressBar
android:layout_width="match_parent"
android:id="@+id/fat_bar"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_height="wrap_content"
android:progress="24"/>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<androidx.recyclerview.widget.RecyclerView
android:clipToPadding="false"
android:id="@+id/list"
android:padding="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:listitem="@layout/item_list"
tools:context=".ui.weight.ListWeightFragment" />
</LinearLayout>