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

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