feat:公聊厅消息列表支持头饰展示

This commit is contained in:
max
2024-05-10 11:23:31 +08:00
parent af0ba80b30
commit a7a04c2950
4 changed files with 102 additions and 29 deletions

View File

@@ -1,53 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:clipChildren="false"
android:clipToPadding="false"
android:orientation="vertical"
android:paddingTop="6dp"
android:paddingBottom="6dp"
android:paddingStart="15dp"
android:paddingEnd="15dp">
android:paddingTop="6dp"
android:paddingEnd="15dp"
android:paddingBottom="6dp">
<TextView
android:id="@+id/message_item_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/bubble_time_layout_margin_bottom"
android:layout_marginTop="@dimen/bubble_time_layout_margin_top"
android:layout_marginBottom="@dimen/bubble_time_layout_margin_bottom"
android:paddingStart="7dip"
android:paddingEnd="7dip"
android:textColor="#666666"
android:textSize="11sp"
android:visibility="gone" />
<com.netease.nim.uikit.common.ui.imageview.HeadImageView
android:id="@+id/message_item_portrait_left"
<FrameLayout
android:id="@+id/message_item_portrait_left_layout"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_below="@id/message_item_time"
android:layout_alignParentStart="true"
android:layout_below="@id/message_item_time"
android:layout_marginEnd="8dp"
android:clipChildren="false"
android:visibility="gone"
tools:visibility="visible" />
tools:visibility="visible">
<com.netease.nim.uikit.common.ui.imageview.HeadImageView
android:id="@+id/message_item_portrait_right"
<com.netease.nim.uikit.common.ui.imageview.HeadImageView
android:id="@+id/message_item_portrait_left"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
android:id="@+id/message_item_head_wear_left"
android:layout_width="59.4dp"
android:layout_height="59.4dp"
android:layout_marginStart="-7.2dp"
android:layout_marginTop="-7.2dp"
android:visibility="gone"
tools:visibility="visible" />
</FrameLayout>
<FrameLayout
android:id="@+id/message_item_portrait_right_layout"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_alignParentEnd="true"
android:layout_below="@id/message_item_time"
android:layout_alignParentEnd="true"
android:layout_marginStart="8dp"
android:visibility="gone" />
android:visibility="gone"
tools:visibility="visible">
<com.netease.nim.uikit.common.ui.imageview.HeadImageView
android:id="@+id/message_item_portrait_right"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
android:id="@+id/message_item_head_wear_right"
android:layout_width="59.4dp"
android:layout_height="59.4dp"
android:layout_marginStart="-7.2dp"
android:layout_marginTop="-7.2dp"
android:visibility="gone"
tools:visibility="visible" />
</FrameLayout>
<LinearLayout
android:layout_marginTop="10dp"
android:id="@+id/message_item_name_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/message_item_time"
android:layout_toStartOf="@id/message_item_portrait_right"
android:layout_toEndOf="@id/message_item_portrait_left"
android:layout_marginTop="10dp"
android:layout_toStartOf="@id/message_item_portrait_right_layout"
android:layout_toEndOf="@id/message_item_portrait_left_layout"
android:orientation="horizontal">
<ImageView
@@ -57,10 +92,10 @@
android:visibility="gone" />
<TextView
android:layout_marginBottom="10dp"
android:id="@+id/message_item_nickname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxWidth="200dip"
@@ -74,8 +109,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/message_item_name_layout"
android:layout_toStartOf="@id/message_item_portrait_right"
android:layout_toEndOf="@id/message_item_portrait_left">
android:layout_toStartOf="@id/message_item_portrait_right_layout"
android:layout_toEndOf="@id/message_item_portrait_left_layout">
<LinearLayout
android:id="@+id/message_item_body"