home_course_item_view.xml 4.38 KB
Newer Older
YKai committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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="@dimen/platform_dp_99"
    android:layout_marginLeft="@dimen/platform_dp_15"
    android:layout_marginTop="@dimen/platform_dp_3"
    android:layout_marginRight="@dimen/platform_dp_15"
    android:layout_marginBottom="@dimen/platform_dp_13"
    android:background="@drawable/home_card_view_stroke"
    android:padding="@dimen/platform_dp_15">

    <androidx.cardview.widget.CardView
        android:id="@+id/homeModuleCourseItemViewImgCardView"
        android:layout_width="127dp"
        android:layout_height="69dp"
        app:cardCornerRadius="6dp"
        app:cardElevation="0dp">

        <ImageView
            android:id="@+id/homeModuleCourseItemViewImg"
            android:layout_width="127dp"
            android:layout_height="69dp"
            android:scaleType="centerCrop"
            android:src="@drawable/home_image_default_back" />

    </androidx.cardview.widget.CardView>

    <TextView
        android:id="@+id/homeModuleCourseItemViewTitle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="@dimen/platform_dp_12"
        android:layout_marginTop="-2dp"
        android:layout_toRightOf="@+id/homeModuleCourseItemViewImgCardView"
        android:ellipsize="end"
        android:maxLines="2"
        android:textColor="@color/platform_color_242424"
        android:textSize="@dimen/platform_dp_16"
        android:textStyle="bold"
        tools:text="深度睡眠速效药丸丨帮你
像婴儿般安稳入睡深度睡眠速效药丸丨帮你
像婴儿般安稳入睡" />

    <TextView
        android:id="@+id/homeModuleCourseItemViewFreePrice"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/homeModuleCourseItemViewImgCardView"
        android:layout_marginLeft="@dimen/platform_dp_12"
        android:layout_toRightOf="@+id/homeModuleCourseItemViewImgCardView"
        android:text="免费"
        android:textColor="@color/platform_color_34CD65"
        android:textSize="@dimen/platform_dp_15"
        android:textStyle="bold"
        android:visibility="gone" />

    <RelativeLayout
        android:id="@+id/homeModuleCourseItemViewExpensePriceHideView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/homeModuleCourseItemViewImgCardView"
        android:layout_marginLeft="@dimen/platform_dp_12"
        android:layout_marginBottom="-2dp"
        android:layout_toRightOf="@+id/homeModuleCourseItemViewImgCardView">

        <TextView
            android:id="@+id/homeModuleCourseItemViewExpensePrice"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@color/platform_color_FF5A4C"
            android:textSize="16dp"
            android:textStyle="bold"
            tools:text="¥688" />
    </RelativeLayout>

    <TextView
        android:id="@+id/homeModuleCourseItemViewPersonText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/homeModuleCourseItemViewExpensePriceHideView"
        android:layout_alignBottom="@+id/homeModuleCourseItemViewExpensePriceHideView"
        android:layout_alignParentRight="true"
        android:layout_marginBottom="-1dp"
        android:gravity="center"
        android:text="人气"
        android:textColor="@color/platform_color_666666"
        android:textSize="@dimen/platform_dp_11" />

    <TextView
        android:id="@+id/homeModuleCourseItemViewPersonNum"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/homeModuleCourseItemViewExpensePriceHideView"
        android:layout_alignBottom="@+id/homeModuleCourseItemViewExpensePriceHideView"
        android:layout_marginBottom="-1dp"
        android:layout_toLeftOf="@+id/homeModuleCourseItemViewPersonText"
        android:gravity="center"
        android:textColor="@color/platform_color_242424"
        android:textSize="@dimen/platform_dp_12"
        tools:text="3109" />
</RelativeLayout>