item_trolley.xml 4.94 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
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_vertical"
    android:orientation="horizontal"
wjg committed
8
    android:padding="@dimen/padding10">
weijiguang committed
9
    <ToggleButton
wjg committed
10 11
        android:id="@+id/butn_state"
        style="@style/button_style"
wjg committed
12 13
        android:layout_width="@dimen/ic_checkbox"
        android:layout_height="@dimen/ic_checkbox"
wjg committed
14 15
        android:background="@drawable/sel_butn_check"
        android:checked="true"
wjg committed
16
        android:foreground="?selectableItemBackground"
wjg committed
17 18
        android:textOff=""
        android:textOn="" />
weijiguang committed
19
    <ImageView
wjg committed
20
        android:id="@+id/img_thumbnail"
wjg committed
21 22 23 24
        android:layout_width="@dimen/goods_thum_size"
        android:layout_height="@dimen/goods_thum_size"
        android:layout_marginLeft="@dimen/padding10"
        android:layout_marginRight="@dimen/padding10"
wjg committed
25
        android:scaleType="centerCrop" />
weijiguang committed
26 27 28 29 30 31 32 33 34 35
    <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
36
            android:textColor="@color/textPrimary"
wjg committed
37
            android:textSize="@dimen/ts_goods_item_name"
weijiguang committed
38 39 40 41 42
            android:textStyle="bold" />
        <TextView
            android:id="@+id/txt_options"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
wjg committed
43
            android:layout_marginTop="@dimen/padding5"
weijiguang committed
44
            android:text="冰/无糖"
wjg committed
45
            android:textColor="@color/textSecondPrimary"
wjg committed
46
            android:textSize="@dimen/ts_goods_item_intro" />
weijiguang committed
47 48 49
        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
wjg committed
50
            android:layout_marginTop="@dimen/padding5"
wjg committed
51
            android:gravity="bottom"
weijiguang committed
52
            android:orientation="horizontal">
wjg committed
53
            <TextView
wjg committed
54
                android:id="@+id/ico_discount"
wjg committed
55 56 57 58 59
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="¥"
                android:textColor="@color/textRed"
                android:textSize="@dimen/ts_goods_item_price" />
weijiguang committed
60
            <TextView
wjg committed
61
                android:id="@+id/txt_discount"
weijiguang committed
62 63 64
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="19.9"
wjg committed
65
                android:textColor="@color/textRed"
wjg committed
66
                android:textSize="@dimen/ts_goods_item_price"
weijiguang committed
67
                android:textStyle="bold" />
wjg committed
68
            <TextView
wjg committed
69
                android:id="@+id/ico_price"
wjg committed
70 71
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
wjg committed
72
                android:layout_marginStart="@dimen/padding5"
wjg committed
73 74 75
                android:text="¥"
                android:textColor="@color/textSecondPrimary"
                android:textSize="@dimen/ts_goods_item_discount" />
weijiguang committed
76
            <TextView
wjg committed
77
                android:id="@+id/txt_price"
wjg committed
78
                android:layout_width="0dp"
weijiguang committed
79
                android:layout_height="wrap_content"
wjg committed
80
                android:layout_weight="1"
weijiguang committed
81
                android:text="29.9"
wjg committed
82
                android:textColor="@color/textSecondPrimary"
wjg committed
83
                android:textSize="@dimen/ts_goods_item_discount" />
weijiguang committed
84 85 86 87 88
        </LinearLayout>
    </LinearLayout>
    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
wjg committed
89
        android:layout_marginStart="@dimen/padding10"
weijiguang committed
90 91 92 93
        android:gravity="center"
        android:orientation="horizontal">
        <Button
            android:id="@+id/butn_subtract"
wjg committed
94
            style="@style/button_style"
wjg committed
95 96
            android:layout_width="@dimen/ic_subtract_size"
            android:layout_height="@dimen/ic_subtract_size"
wjg committed
97 98
            android:background="@mipmap/jianhao_2x"
            android:foreground="?selectableItemBackground" />
weijiguang committed
99 100 101 102
        <TextView
            android:id="@+id/txt_count"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
wjg committed
103 104
            android:layout_marginLeft="@dimen/padding10"
            android:layout_marginRight="@dimen/padding10"
weijiguang committed
105
            android:text="1"
wjg committed
106
            android:textColor="@color/textPrimary"
wjg committed
107 108
            android:textSize="@dimen/ts_trolley_item_count"
            android:textStyle="bold" />
weijiguang committed
109 110
        <Button
            android:id="@+id/butn_add"
wjg committed
111
            style="@style/button_style"
wjg committed
112 113
            android:layout_width="@dimen/ic_add_size"
            android:layout_height="@dimen/ic_add_size"
wjg committed
114 115
            android:background="@mipmap/jiahao_2x"
            android:foreground="?selectableItemBackground" />
weijiguang committed
116 117
    </LinearLayout>
</LinearLayout>