im_chat_item_view.xml 6.2 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
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:paddingLeft="15dp"
    android:paddingRight="15dp"
    android:orientation="horizontal"
    android:paddingTop="12dp"
    android:id="@+id/chat_global_ll">


    <RelativeLayout
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="@drawable/im_chat_message_img_line">

        <androidx.cardview.widget.CardView
            android:layout_width="48dp"
            android:layout_height="48dp"
            app:cardCornerRadius="24dp"
            app:cardElevation="0dp"
            android:layout_centerInParent="true">

            <ImageView
                android:id="@+id/chat_message_img"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scaleType="centerCrop" />
        </androidx.cardview.widget.CardView>

        <TextView
            android:id="@+id/chat_message_unread_num"
            android:layout_width="wrap_content"
            android:minWidth="18dp"
            android:layout_height="18dp"
            android:layout_alignParentRight="true"
            android:layout_alignParentTop="true"
            android:background="@drawable/im_chat_message_unread_num_bg"
            android:paddingLeft="5dp"
            android:paddingRight="5dp"
            android:visibility="gone"
            android:textSize="10dp"
            android:gravity="center"
            android:textColor="@color/im_white"
            tools:text="3" />

        <TextView
            android:id="@+id/chat_message_sub_desc"
            android:layout_width="match_parent"
            android:layout_height="16dp"
            android:gravity="center"
            tools:text="已咨询3次"
            android:textSize="9dp"
            android:textColor="#999999"
            android:background="@drawable/im_has_consult_num_bg"
            android:layout_alignParentBottom="true"/>
    </RelativeLayout>

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15dp"
        android:layout_weight="1"
        android:orientation="vertical">

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

            <LinearLayout
                android:layout_width="0dp"
                android:layout_weight="1"
                android:layout_height="wrap_content"
                android:orientation="horizontal">
                <TextView
                    android:id="@+id/chat_message_name"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="#242424"
                    android:textSize="18dp"
                    tools:text="林小丽"
                    android:ellipsize="end"
                    android:maxLines="1" />

                <TextView
                    android:id="@+id/chat_message_tab"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:layout_marginLeft="6dp"
                    android:layout_marginRight="8dp"
                    android:textColor="#666666"
                    android:textSize="13dp"
                    tools:text="高级心理咨询师"
                    android:visibility="gone"/>
            </LinearLayout>



            <TextView
                android:id="@+id/chat_message_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="end"
                tools:text="09-04"
                android:maxLines="1"
                android:textColor="#999999"
                android:textSize="11dp" />
        </LinearLayout>
115 116
        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
YKai committed
117
            android:layout_height="wrap_content"
118 119
            android:orientation="horizontal"
            android:gravity="center"
YKai committed
120
            android:layout_marginTop="5dp"
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
            >
            <TextView
                android:id="@+id/chat_message_content"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@id/not_disturb"
                android:layout_marginEnd="@dimen/platform_dp_10"
                android:layout_marginBottom="18dp"
                android:ellipsize="end"
                android:includeFontPadding="false"
                android:layout_toLeftOf="@id/not_disturb"
                android:maxLines="1"
                android:text="你好,请问你遇到了什么烦恼?我可你好,请问你遇到了什么烦恼?我可以帮…"
                android:textColor="#999999"
                android:textSize="14dp" />
            <ImageView
                android:layout_width="@dimen/platform_dp_15"
                android:layout_height="@dimen/platform_dp_15"
                android:src="@drawable/team_not_disturb"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/chat_message_content"
                app:layout_constraintBottom_toBottomOf="@id/chat_message_content"
                android:id="@+id/not_disturb"
                android:visibility="gone"
                >
            </ImageView>
        </androidx.constraintlayout.widget.ConstraintLayout>
YKai committed
151 152 153 154 155 156 157 158

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

</LinearLayout>