im_notice_item_view.xml 2.72 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
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:paddingLeft="14dp"
    android:paddingRight="15dp"
    android:paddingTop="16dp">

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

        <ImageView
            android:id="@+id/notice_message_img"
            android:layout_width="18dp"
            android:layout_height="18dp"
            android:layout_marginTop="2dp"
            android:scaleType="centerCrop" />

        <RelativeLayout
            android:layout_width="0dp"
            android:layout_height="61dp"
            android:layout_marginLeft="14dp"
            android:layout_marginRight="15dp"
            android:layout_weight="1">

            <TextView
                android:id="@+id/notice_message_title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="#242424"
                android:textSize="16dp"
                android:textStyle="bold"
                tools:text="@string/im_app_name" />

            <TextView
                android:id="@+id/notice_message_content"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:layout_marginBottom="15dp"
                android:ellipsize="end"
                android:maxLines="1"
                android:textColor="#999999"
                android:textSize="13dp"
                tools:text="您已成功购买《解决50个常见亲子相处难题…" />
        </RelativeLayout>

        <TextView
            android:id="@+id/notice_message_unread_num"
            android:layout_centerInParent="true"
            android:layout_width="wrap_content"
            android:minWidth="14dp"
            android:layout_height="14dp"
            android:paddingLeft="3dp"
            android:paddingRight="3dp"
            android:gravity="center"
            android:background="@drawable/im_message_num_bg"
            android:textSize="10dp"
            android:textColor="#ffffff"
            tools:text="99+"
            android:visibility="gone"/>

    </LinearLayout>

    <View
        android:layout_width="match_parent"
        android:layout_height="0.5dp"
        android:layout_marginLeft="32dp"
        android:background="#EBEBEB" />

</LinearLayout>