home_article_item_view.xml 5.51 KB
Newer Older
konghaorui 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 126 127
<?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"
    android:paddingLeft="@@dimen/platform_dp_15"
    android:paddingRight="@@dimen/platform_dp_15"
    android:paddingTop="@@dimen/platform_dp_15">

    <android.support.v7.widget.CardView
        android:id="@+id/homeModuleArticleItemViewCardImg"
        android:layout_width="@@dimen/platform_dp_127"
        android:layout_height="@@dimen/platform_dp_88"
        android:layout_alignParentRight="true"
        app:cardCornerRadius="@@dimen/platform_dp_6"
        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"
        android:textSize="@@dimen/platform_dp_18"
        android:textStyle="bold"
        android:layout_marginTop="-2dp"
        android:textColor="@color/platform_color_222222"
        android:layout_alignParentTop="true"
        android:lineSpacingExtra="@@dimen/platform_dp_1"
        tools:text="喧嚣的世界中,你的重要何以而来?喧嚣的世界中,你的重要何以而来?"
        android:layout_alignParentLeft="true"
        android:layout_toLeftOf="@+id/homeModuleArticleItemViewCardImg"
        android:layout_marginRight="@@dimen/platform_dp_20"/>

    <TextView
        android:id="@+id/homeModuleArticleItemViewContent"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:maxLines="2"
        android:ellipsize="end"
        android:textSize="@@dimen/platform_dp_13"
        android:layout_marginTop="@@dimen/platform_dp_4"
        android:textColor="@color/platform_color_666666"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/homeModuleArticleItemViewTitle"
        android:lineSpacingExtra="@@dimen/platform_dp_3"
        tools:text="喧嚣的世界中,你的重要何以而来?当我伫立在我所伫立之处..."
        android:layout_toLeftOf="@+id/homeModuleArticleItemViewCardImg"
        android:layout_marginRight="@@dimen/platform_dp_20"/>

    <LinearLayout
        android:id="@+id/homeModuleArticleItemViewBottomLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:layout_below="@+id/homeModuleArticleItemViewCardImg"
        android:layout_marginTop="@@dimen/platform_dp_16">

        <ImageView
            android:id="@+id/homeModuleArticleItemViewIcon"
            android:layout_width="@@dimen/platform_dp_12"
            android:layout_height="@@dimen/platform_dp_12"
            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"
            android:textSize="@@dimen/platform_dp_12"
            android:textColor="@color/platform_color_242424"
            android:layout_marginLeft="@@dimen/platform_dp_3"
            android:textStyle="bold"
            tools:text="赵秀英"/>

        <TextView
            android:id="@+id/homeModuleArticleItemViewGreatNum"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            tools:text="3327"
            android:textSize="@@dimen/platform_dp_12"
            android:textColor="@color/platform_color_242424"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="点赞"
            android:textSize="@@dimen/platform_dp_11"
            android:layout_marginRight="@@dimen/platform_dp_12"
            android:textColor="@color/platform_color_666666"/>

        <TextView
            android:id="@+id/homeModuleArticleItemViewLookNum"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            tools:text="2656"
            android:textSize="@@dimen/platform_dp_12"
            android:textColor="@color/platform_color_242424"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="浏览"
            android:textSize="@@dimen/platform_dp_11"
            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"
        android:layout_marginTop="@@dimen/platform_dp_16"/>

</RelativeLayout>