item_trolley.xml 4.13 KB
Newer Older
weijiguang committed
1 2 3 4 5 6 7 8
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_vertical"
    android:orientation="horizontal"
    android:padding="10dp">
    <ToggleButton
wjg committed
9 10 11 12 13 14 15 16
        android:id="@+id/butn_state"
        style="@style/button_style"
        android:layout_width="25dp"
        android:layout_height="25dp"
        android:background="@drawable/sel_butn_check"
        android:checked="true"
        android:textOff=""
        android:textOn="" />
weijiguang committed
17
    <ImageView
wjg committed
18
        android:id="@+id/img_thumbnail"
weijiguang committed
19 20 21
        android:layout_width="80dp"
        android:layout_height="80dp"
        android:layout_marginLeft="10dp"
wjg committed
22 23
        android:layout_marginRight="10dp"
        android:scaleType="centerCrop" />
weijiguang committed
24 25 26 27 28 29 30 31 32 33
    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:orientation="vertical">
        <TextView
            android:id="@+id/txt_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="冰茶咖啡"
wjg committed
34
            android:textColor="@color/textPrimary"
weijiguang committed
35 36 37 38 39 40 41 42
            android:textSize="14sp"
            android:textStyle="bold" />
        <TextView
            android:id="@+id/txt_options"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="3dp"
            android:text="冰/无糖"
wjg committed
43
            android:textColor="@color/textSecondPrimary"
weijiguang committed
44 45 46 47 48
            android:textSize="12sp" />
        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="3dp"
wjg committed
49
            android:gravity="bottom"
weijiguang committed
50
            android:orientation="horizontal">
wjg committed
51 52 53 54
            <ImageView
                android:layout_width="15dp"
                android:layout_height="15dp"
                android:src="@drawable/ms__arrow" />
weijiguang committed
55
            <TextView
wjg committed
56
                android:id="@+id/txt_price"
weijiguang committed
57 58 59 60
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:text="19.9"
wjg committed
61
                android:textColor="@color/textRed"
weijiguang committed
62 63 64
                android:textSize="12sp"
                android:textStyle="bold" />

wjg committed
65 66 67 68 69
            <ImageView
                android:layout_width="10dp"
                android:layout_height="10dp"
                android:layout_marginStart="5dp"
                android:src="@drawable/ms__arrow" />
weijiguang committed
70
            <TextView
wjg committed
71 72
                android:id="@+id/txt_discount"
                android:layout_width="0dp"
weijiguang committed
73
                android:layout_height="wrap_content"
wjg committed
74
                android:layout_weight="1"
weijiguang committed
75 76
                android:gravity="center_vertical"
                android:text="29.9"
wjg committed
77
                android:textColor="@color/textSecondPrimary"
weijiguang committed
78 79 80 81 82 83
                android:textSize="9sp" />
        </LinearLayout>
    </LinearLayout>
    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
wjg committed
84
        android:layout_marginStart="10dp"
weijiguang committed
85 86 87 88
        android:gravity="center"
        android:orientation="horizontal">
        <Button
            android:id="@+id/butn_subtract"
wjg committed
89 90 91 92
            style="@style/button_style"
            android:layout_width="20dp"
            android:layout_height="20dp"
            android:background="@drawable/ic_sub" />
weijiguang committed
93 94 95 96
        <TextView
            android:id="@+id/txt_count"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
wjg committed
97 98
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
weijiguang committed
99
            android:text="1"
wjg committed
100
            android:textColor="@color/textPrimary"
weijiguang committed
101 102 103
            android:textSize="12sp" />
        <Button
            android:id="@+id/butn_add"
wjg committed
104 105 106 107
            style="@style/button_style"
            android:layout_width="20dp"
            android:layout_height="20dp"
            android:background="@drawable/ic_add" />
weijiguang committed
108 109
    </LinearLayout>
</LinearLayout>