AndroidAPS/app/src/main/res/layout/food_item.xml

141 lines
5.5 KiB
XML
Raw Normal View History

2017-10-17 20:55:23 +02:00
<?xml version="1.0" encoding="utf-8"?>
2019-05-16 13:57:37 +02:00
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
2017-10-17 20:55:23 +02:00
xmlns:card_view="http://schemas.android.com/apk/res-auto"
2021-03-19 18:49:34 +01:00
xmlns:tools="http://schemas.android.com/tools"
2017-10-17 20:55:23 +02:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
2021-03-19 18:49:34 +01:00
card_view:cardBackgroundColor="?android:colorBackground">
2017-10-17 20:55:23 +02:00
<LinearLayout
2021-12-11 04:41:09 +01:00
android:id="@+id/food_item"
2017-10-17 20:55:23 +02:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
2021-12-11 04:41:09 +01:00
android:id="@+id/left_right_split"
2017-10-17 20:55:23 +02:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2021-12-11 04:41:09 +01:00
android:orientation="horizontal"
android:paddingLeft="3dp"
android:paddingRight="3dp">
2017-10-17 20:55:23 +02:00
2021-12-11 04:41:09 +01:00
<LinearLayout
android:id="@+id/name_and_info_container"
android:layout_width="wrap_content"
2017-10-17 20:55:23 +02:00
android:layout_height="wrap_content"
2021-12-11 04:41:09 +01:00
android:orientation="vertical"
2017-10-17 20:55:23 +02:00
android:layout_weight="1"
2021-12-11 04:41:09 +01:00
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_marginLeft="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>
2017-10-17 20:55:23 +02:00
</LinearLayout>
2021-03-19 18:49:34 +01:00
<View
android:layout_width="fill_parent"
android:layout_height="2dip"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:background="@color/list_delimiter" />
2017-10-17 20:55:23 +02:00
</LinearLayout>
2019-05-16 13:57:37 +02:00
</androidx.cardview.widget.CardView>