home_course_item_view.xml 4.08 KB
Newer Older
konghaorui committed
1 2
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
ydl committed
3 4
    android:layout_width="166dp"
    android:layout_height="wrap_content"
konghaorui committed
5 6
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
ydl committed
7 8
    android:layout_marginLeft="5dp"
    android:layout_marginRight="5dp"
ydl committed
9
    android:layout_marginTop="10dp">
konghaorui committed
10 11 12

    <android.support.v7.widget.CardView
        android:id="@+id/homeModuleCourseItemViewImgCardView"
ydl committed
13 14 15
        android:layout_width="166dp"
        android:layout_height="90.3dp"
        app:cardCornerRadius="4dp"
konghaorui committed
16 17 18
        app:cardElevation="0dp">
        <ImageView
            android:id="@+id/homeModuleCourseItemViewImg"
ydl committed
19 20
            android:layout_width="166dp"
            android:layout_height="90.3dp"
konghaorui committed
21
            android:scaleType="centerCrop"
ydl committed
22
            android:background="@drawable/home_image_default_back"/>
konghaorui committed
23 24 25 26 27 28 29

    </android.support.v7.widget.CardView>

    <TextView
        android:id="@+id/homeModuleCourseItemViewTitle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
ydl committed
30
        android:layout_below="@+id/homeModuleCourseItemViewImgCardView"
ydl committed
31
        android:textSize="@dimen/platform_dp_15"
konghaorui committed
32 33
        android:textColor="@color/platform_color_242424"
        android:textStyle="bold"
ydl committed
34
        android:lineHeight="17dp"
konghaorui committed
35 36
        android:maxLines="2"
        android:ellipsize="end"
ydl committed
37
        android:layout_marginTop="12dp"
konghaorui committed
38 39 40
        tools:text="深度睡眠速效药丸丨帮你
像婴儿般安稳入睡深度睡眠速效药丸丨帮你
像婴儿般安稳入睡"/>
ydl committed
41 42


konghaorui committed
43
    <RelativeLayout
ydl committed
44
        android:id="@+id/homeModuleCourseItemViewPriceRl"
konghaorui committed
45 46
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
ydl committed
47
        android:layout_below="@+id/homeModuleCourseItemViewTitle">
konghaorui committed
48
        <TextView
ydl committed
49 50 51
            android:layout_marginTop="5dp"
            android:id="@+id/homeModuleCourseItemViewFreePrice"
            android:visibility="gone"
konghaorui committed
52 53
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
ydl committed
54 55
            android:text="免费"
            android:textSize="@dimen/platform_dp_15"
konghaorui committed
56
            android:textStyle="bold"
ydl committed
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
            android:textColor="@color/platform_color_34CD65"
            />
        <RelativeLayout
            android:layout_marginTop="5dp"
            android:id="@+id/homeModuleCourseItemViewExpensePriceHideView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content">
            <TextView
                android:id="@+id/homeModuleCourseItemViewExpensePrice"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                tools:text="¥688"
                android:textStyle="bold"
                android:textSize="15dp"
                android:textColor="#ED7474"/>
        </RelativeLayout>
konghaorui committed
73
    </RelativeLayout>
ydl committed
74

konghaorui committed
75
    <TextView
ydl committed
76
        android:id="@+id/homeModuleCourseItemViewPersonNum"
konghaorui committed
77 78
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
ydl committed
79 80 81 82 83 84
        tools:text="3109"
        android:textSize="@dimen/platform_dp_12"
        android:textColor="@color/platform_color_999999"
        android:layout_marginLeft="7dp"
        android:layout_toRightOf="@+id/homeModuleCourseItemViewPriceRl"
        android:layout_alignBottom="@+id/homeModuleCourseItemViewPriceRl"
konghaorui committed
85
        android:gravity="center"
ydl committed
86
        android:layout_marginBottom="2dp"
konghaorui committed
87
        />
ydl committed
88

konghaorui committed
89
    <TextView
ydl committed
90
        android:id="@+id/homeModuleCourseItemViewPersonText"
konghaorui committed
91 92
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
ydl committed
93
        android:text="人气"
konghaorui committed
94 95
        android:textSize="@dimen/platform_dp_12"
        android:gravity="center"
ydl committed
96 97 98 99
        android:textColor="@color/platform_color_999999"
        android:layout_toRightOf="@+id/homeModuleCourseItemViewPersonNum"
        android:layout_alignBottom="@+id/homeModuleCourseItemViewPriceRl"
        android:layout_marginBottom="2dp"
konghaorui committed
100
        />
ydl committed
101

konghaorui committed
102
</RelativeLayout>