tests_testhome_recommend_first_view.xml 4.94 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 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView 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="wrap_content"
    android:layout_marginBottom="5dp"
    android:layout_marginLeft="15dp"
    android:layout_marginRight="15dp"
    android:layout_marginTop="70dp"
    app:cardCornerRadius="6dp"
    app:cardElevation="2dp">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <ImageView
            android:id="@+id/img_recom"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:scaleType="centerCrop" />

        <TextView
            android:id="@+id/tv_recomTitle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp"
            android:layout_marginTop="15dp"
            android:ellipsize="end"
            android:lines="1"
            android:textColor="#3d3d3d"
            android:textSize="15dp"
            tools:text="天生好命?测你是欧洲人还是非洲人" />

        <TextView
            android:id="@+id/tv_recomContent"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp"
            android:layout_marginTop="8dp"
            android:ellipsize="end"
            android:lines="1"
            android:textColor="#666"
            android:textSize="12dp"
            tools:text="你是速度快放假独守空房绝对是框架的首付款涉及到开发商贷款纠纷" />

        <View
            android:id="@+id/v_line"
            android:layout_width="match_parent"
            android:layout_height="0.5dp"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp"
            android:layout_marginTop="13dp"
            android:background="#F0F0F0" />

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="36dp">

            <TextView
                android:id="@+id/tv_recomPrice"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_marginLeft="15dp"
                android:layout_marginTop="@dimen/platform_dp_10"
                android:background="@drawable/tests_testhome_recom_price_bg"
                android:gravity="center"
                android:paddingBottom="2dp"
                android:paddingLeft="5dp"
                android:paddingRight="5dp"
                android:paddingTop="2dp"
                android:textColor="#34CD65"
                android:textSize="11dp"
                tools:text="免费" />

            <TextView
                android:id="@+id/tv_coupon_money"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/tests_bg_corner_border_orange"
                android:textColor="#FF5A4C"
                tools:text="券已抵扣5元"
                android:layout_toRightOf="@id/tv_recomPrice"
                android:layout_marginLeft="6dp"
                android:paddingTop="1dp"
                android:paddingBottom="1dp"
                android:paddingRight="4dp"
                android:paddingLeft="4dp"
                android:textSize="10sp"
                android:gravity="center"
                android:layout_alignBottom="@id/tv_recomPrice"
                android:layout_marginBottom="4dp"
                android:visibility="gone"
                tools:visibility="visible"
                />

            <TextView
                android:id="@+id/tv_recomNum"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginRight="15dp"
                android:textColor="#999"
                android:textSize="10dp"
                tools:text="14000人测过" />

            <TextView
                android:id="@+id/tv_Hits"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_marginRight="14dp"
                android:layout_toLeftOf="@+id/tv_recomNum"
                android:textColor="#999"
                android:textSize="10dp"
                tools:text="5616人气" />
        </RelativeLayout>
    </LinearLayout>
</androidx.cardview.widget.CardView>