home_article_item_view.xml 5.48 KB
Newer Older
konghaorui committed
1 2 3 4 5 6
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
konghaorui committed
7 8 9
    android:paddingLeft="@dimen/platform_dp_15"
    android:paddingRight="@dimen/platform_dp_15"
    android:paddingTop="@dimen/platform_dp_15">
konghaorui committed
10 11 12

    <android.support.v7.widget.CardView
        android:id="@+id/homeModuleArticleItemViewCardImg"
konghaorui committed
13 14
        android:layout_width="@dimen/platform_dp_127"
        android:layout_height="@dimen/platform_dp_88"
konghaorui committed
15
        android:layout_alignParentRight="true"
konghaorui committed
16
        app:cardCornerRadius="@dimen/platform_dp_6"
konghaorui committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
        app:cardElevation="0dp">
        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="centerCrop"
            android:id="@+id/homeModuleArticleItemViewImg"
            android:background="@drawable/home_image_default_back"/>
    </android.support.v7.widget.CardView>

    <TextView
        android:id="@+id/homeModuleArticleItemViewTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:maxLines="2"
        android:ellipsize="end"
konghaorui committed
32
        android:textSize="@dimen/platform_dp_18"
konghaorui committed
33 34 35 36
        android:textStyle="bold"
        android:layout_marginTop="-2dp"
        android:textColor="@color/platform_color_222222"
        android:layout_alignParentTop="true"
konghaorui committed
37
        android:lineSpacingExtra="@dimen/platform_dp_1"
konghaorui committed
38 39 40
        tools:text="喧嚣的世界中,你的重要何以而来?喧嚣的世界中,你的重要何以而来?"
        android:layout_alignParentLeft="true"
        android:layout_toLeftOf="@+id/homeModuleArticleItemViewCardImg"
konghaorui committed
41
        android:layout_marginRight="@dimen/platform_dp_20"/>
konghaorui committed
42 43 44 45 46 47 48

    <TextView
        android:id="@+id/homeModuleArticleItemViewContent"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:maxLines="2"
        android:ellipsize="end"
konghaorui committed
49 50
        android:textSize="@dimen/platform_dp_13"
        android:layout_marginTop="@dimen/platform_dp_4"
konghaorui committed
51 52 53
        android:textColor="@color/platform_color_666666"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/homeModuleArticleItemViewTitle"
konghaorui committed
54
        android:lineSpacingExtra="@dimen/platform_dp_3"
konghaorui committed
55 56
        tools:text="喧嚣的世界中,你的重要何以而来?当我伫立在我所伫立之处..."
        android:layout_toLeftOf="@+id/homeModuleArticleItemViewCardImg"
konghaorui committed
57
        android:layout_marginRight="@dimen/platform_dp_20"/>
konghaorui committed
58 59 60 61 62 63 64

    <LinearLayout
        android:id="@+id/homeModuleArticleItemViewBottomLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:layout_below="@+id/homeModuleArticleItemViewCardImg"
konghaorui committed
65
        android:layout_marginTop="@dimen/platform_dp_16">
konghaorui committed
66 67 68

        <ImageView
            android:id="@+id/homeModuleArticleItemViewIcon"
konghaorui committed
69 70
            android:layout_width="@dimen/platform_dp_12"
            android:layout_height="@dimen/platform_dp_12"
konghaorui committed
71 72 73 74 75 76 77 78
            android:src="@drawable/home_article_item_icon"
            android:layout_alignParentLeft="true"/>

        <TextView
            android:id="@+id/homeModuleArticleItemViewAuthor"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content"
konghaorui committed
79
            android:textSize="@dimen/platform_dp_12"
konghaorui committed
80
            android:textColor="@color/platform_color_242424"
konghaorui committed
81
            android:layout_marginLeft="@dimen/platform_dp_3"
konghaorui committed
82 83 84 85 86 87 88 89
            android:textStyle="bold"
            tools:text="赵秀英"/>

        <TextView
            android:id="@+id/homeModuleArticleItemViewGreatNum"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            tools:text="3327"
konghaorui committed
90
            android:textSize="@dimen/platform_dp_12"
konghaorui committed
91 92 93 94 95 96
            android:textColor="@color/platform_color_242424"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="点赞"
konghaorui committed
97 98
            android:textSize="@dimen/platform_dp_11"
            android:layout_marginRight="@dimen/platform_dp_12"
konghaorui committed
99 100 101 102 103 104 105
            android:textColor="@color/platform_color_666666"/>

        <TextView
            android:id="@+id/homeModuleArticleItemViewLookNum"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            tools:text="2656"
konghaorui committed
106
            android:textSize="@dimen/platform_dp_12"
konghaorui committed
107 108 109 110 111 112
            android:textColor="@color/platform_color_242424"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="浏览"
konghaorui committed
113
            android:textSize="@dimen/platform_dp_11"
konghaorui committed
114 115 116 117 118 119 120 121 122 123 124
            android:textColor="@color/platform_color_666666"/>

    </LinearLayout>

    <View
        android:id="@+id/homeModuleArticleItemViewBottomLine"
        android:layout_width="match_parent"
        android:layout_height="0.5dp"
        android:background="@color/platform_color_EBEBEB"
        android:layout_centerInParent="true"
        android:layout_below="@+id/homeModuleArticleItemViewBottomLayout"
konghaorui committed
125
        android:layout_marginTop="@dimen/platform_dp_16"/>
konghaorui committed
126 127

</RelativeLayout>