Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

android / dayu

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • dayu
  • messageCenter
  • src
  • main
  • res
  • layout
  • item_message_layout.xml
Find file
Normal viewHistoryPermalink
item_message_layout.xml 3.74 KB
Newer Older
罗翻's avatar
自定义lrecyclerview和coreAdapter
575c7865
 
罗翻 committed 7 years ago
1 2 3 4 5
<?xml version="1.0" encoding="utf-8"?>
<layout>

    <data>

罗翻's avatar
增加自建单
a2566532
 
罗翻 committed 6 years ago
6
        <import type="android.view.View" />
罗翻's avatar
自定义lrecyclerview和coreAdapter
575c7865
 
罗翻 committed 7 years ago
7

罗翻's avatar
增加自建单
a2566532
 
罗翻 committed 6 years ago
8
        <import type="com.dayu.utils.UtilsDate" />
罗翻's avatar
自定义lrecyclerview和coreAdapter
575c7865
 
罗翻 committed 7 years ago
9 10 11

        <variable
            name="item"
罗翻's avatar
增加自建单
a2566532
 
罗翻 committed 6 years ago
12
            type="com.dayu.message.data.protocol.NewMessage" />
罗翻's avatar
自定义lrecyclerview和coreAdapter
575c7865
 
罗翻 committed 7 years ago
13 14 15
    </data>

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
罗翻's avatar
增加自建单
a2566532
 
罗翻 committed 6 years ago
16 17 18
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_80"
        android:orientation="vertical">
罗翻's avatar
自定义lrecyclerview和coreAdapter
575c7865
 
罗翻 committed 7 years ago
19 20 21 22 23 24 25

        <RelativeLayout
            android:id="@+id/item"
            android:layout_width="@dimen/dp_333"
            android:layout_height="@dimen/dp_80"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="5dp"
罗翻's avatar
增加自建单
a2566532
 
罗翻 committed 6 years ago
26
            android:background="@drawable/item_shape">
罗翻's avatar
自定义lrecyclerview和coreAdapter
575c7865
 
罗翻 committed 7 years ago
27 28 29 30 31 32

            <TextView
                android:id="@+id/line_textView"
                android:layout_width="1dp"
                android:layout_height="match_parent"
                android:layout_marginLeft="89dp"
罗翻's avatar
增加自建单
a2566532
 
罗翻 committed 6 years ago
33
                android:background="@color/line_color" />
罗翻's avatar
自定义lrecyclerview和coreAdapter
575c7865
 
罗翻 committed 7 years ago
34 35 36

            <TextView
                android:id="@+id/message_date"
罗翻's avatar
增加自建单
a2566532
 
罗翻 committed 6 years ago
37
                formartDay="@{item.createTime}"
罗翻's avatar
自定义lrecyclerview和coreAdapter
575c7865
 
罗翻 committed 7 years ago
38 39 40 41 42 43 44
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignRight="@id/line_textView"
                android:layout_marginRight="@dimen/dp_12"
                android:layout_marginTop="@dimen/dp_18"
                android:textColor="@color/cl_home_title_text_color"
                android:textSize="@dimen/sp_12"
罗翻's avatar
增加自建单
a2566532
 
罗翻 committed 6 years ago
45
                android:typeface="@{@string/tv_fonts}" />
罗翻's avatar
自定义lrecyclerview和coreAdapter
575c7865
 
罗翻 committed 7 years ago
46 47 48

            <TextView
                android:id="@+id/message_time"
罗翻's avatar
增加自建单
a2566532
 
罗翻 committed 6 years ago
49
                formartTime="@{item.createTime}"
罗翻's avatar
自定义lrecyclerview和coreAdapter
575c7865
 
罗翻 committed 7 years ago
50 51 52 53 54 55
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignRight="@id/line_textView"
                android:layout_marginRight="@dimen/dp_12"
                android:layout_marginTop="@dimen/dp_34"
                android:textColor="@color/cl_home_title_text_color"
罗翻's avatar
增加自建单
a2566532
 
罗翻 committed 6 years ago
56
                android:textSize="24sp" />
罗翻's avatar
自定义lrecyclerview和coreAdapter
575c7865
 
罗翻 committed 7 years ago
57 58 59 60 61 62 63 64

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_alignLeft="@id/line_textView"
                android:layout_centerVertical="true"
                android:layout_marginLeft="@dimen/dp_16"
                android:gravity="center_vertical"
罗翻's avatar
增加自建单
a2566532
 
罗翻 committed 6 years ago
65
                android:orientation="horizontal">
罗翻's avatar
自定义lrecyclerview和coreAdapter
575c7865
 
罗翻 committed 7 years ago
66 67 68 69 70 71 72 73 74 75

                <TextView
                    android:id="@+id/message_text_content"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:ellipsize="end"
                    android:maxLines="2"
                    android:text="@{item.title}"
                    android:textColor="@color/cl_home_title_text_color"
罗翻's avatar
增加自建单
a2566532
 
罗翻 committed 6 years ago
76
                    android:textSize="@dimen/sp_13.3" />
罗翻's avatar
自定义lrecyclerview和coreAdapter
575c7865
 
罗翻 committed 7 years ago
77 78 79 80 81 82 83 84 85

                <TextView
                    android:id="@+id/read_state"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:layout_centerVertical="true"
                    android:layout_marginRight="@dimen/dp_21.3"
                    android:layout_toRightOf="@id/message_text_content"
罗翻's avatar
去除代码中的中文字
b61ecd3a
 
罗翻 committed 7 years ago
86
                    android:text="@string/not_read"
罗翻's avatar
自定义lrecyclerview和coreAdapter
575c7865
 
罗翻 committed 7 years ago
87 88
                    android:textColor="@color/cl_tab_read"
                    android:textSize="@dimen/sp_10"
罗翻's avatar
增加自建单
a2566532
 
罗翻 committed 6 years ago
89
                    android:visibility='@{item.read ==1?View.GONE:View.VISIBLE}' />
罗翻's avatar
自定义lrecyclerview和coreAdapter
575c7865
 
罗翻 committed 7 years ago
90 91 92 93 94
            </LinearLayout>

        </RelativeLayout>
    </RelativeLayout>
</layout>