151 lines
5.8 KiB
XML
151 lines
5.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<com.google.android.material.card.MaterialCardView
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
style="@style/Widget.MaterialComponents.CardView"
|
|
android:id="@+id/food_card"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="4dp"
|
|
android:layout_marginEnd="4dp"
|
|
android:layout_marginTop="4dp"
|
|
app:strokeWidth="1dp"
|
|
app:cardCornerRadius="4dp"
|
|
app:contentPadding="2dp"
|
|
app:cardElevation="4dp"
|
|
app:cardUseCompatPadding="true"
|
|
android:layout_gravity="center">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/food_item"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/left_right_split"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:paddingStart="3dp"
|
|
android:paddingEnd="3dp">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/name_and_info_container"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:layout_weight="1"
|
|
android:gravity="start">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/name_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
android:id="@+id/name"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="Name"
|
|
android:textStyle="bold"
|
|
android:textSize="@dimen/twenty_four_dp"
|
|
tools:ignore="HardcodedText" />
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/info_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:gravity="start"
|
|
android:orientation="horizontal"
|
|
android:layout_marginStart="5dp">
|
|
|
|
<TextView
|
|
android:id="@+id/carbs"
|
|
android:layout_width="50dp"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center"
|
|
android:text="Carbs"
|
|
tools:ignore="HardcodedText" />
|
|
|
|
<TextView
|
|
android:id="@+id/portion"
|
|
android:layout_width="50dp"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center"
|
|
android:text="Portion"
|
|
tools:ignore="HardcodedText" />
|
|
|
|
<TextView
|
|
android:id="@+id/fat"
|
|
android:layout_width="50dp"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center"
|
|
android:text="Fat"
|
|
tools:ignore="HardcodedText" />
|
|
|
|
<TextView
|
|
android:id="@+id/protein"
|
|
android:layout_width="50dp"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center"
|
|
android:text="Protein"
|
|
tools:ignore="HardcodedText" />
|
|
|
|
<TextView
|
|
android:id="@+id/energy"
|
|
android:layout_width="50dp"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center"
|
|
android:text="Energy"
|
|
tools:ignore="HardcodedText" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/buttons_container"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:orientation="horizontal"
|
|
android:gravity="end">
|
|
|
|
<ImageView
|
|
android:id="@+id/ic_calculator"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="center"
|
|
android:padding="2dp"
|
|
android:orientation="horizontal"
|
|
android:src="@drawable/ic_calculator" />
|
|
<ImageView
|
|
android:id="@+id/ic_remove"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="center"
|
|
android:padding="2dp"
|
|
android:orientation="horizontal"
|
|
android:src="@drawable/ic_trash_outline" />
|
|
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
<View
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="2dip"
|
|
android:layout_marginBottom="5dp"
|
|
android:layout_marginTop="5dp"
|
|
android:background="?android:attr/dividerHorizontal" />
|
|
|
|
</LinearLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|