Files
NutritionMaster/app/src/main/res/layout/customization_item.xml
ScorpioMiku e5c27211bc 1
2018-10-10 20:34:32 +08:00

78 lines
2.8 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView 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"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_margin="2dp"
app:cardCornerRadius="15dp">
<RelativeLayout
android:id="@+id/click"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/customization_item_image"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:scaleType="centerCrop"
tools:src="@drawable/food_test" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_toRightOf="@id/customization_item_image"
android:orientation="vertical">
<TextView
android:id="@+id/food_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="14sp"
tools:text="馒头" />
<TextView
android:id="@+id/food_quantity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#504e4e"
android:textSize="11sp"
tools:text="1个" />
</LinearLayout>
<RelativeLayout
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:gravity="center_vertical">
<ImageView
android:id="@+id/arch"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:src="@drawable/ic_right_arch" />
<TextView
android:id="@+id/food_energy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:layout_toLeftOf="@id/arch"
android:gravity="center_vertical"
android:textSize="11sp"
tools:text="365千卡" />
</RelativeLayout>
</RelativeLayout>
</android.support.v7.widget.CardView>