This commit is contained in:
fengjingqi
2026-11-28 11:03:03 +08:00
parent 29b37c022e
commit 43f2a6fbc5
93 changed files with 4291 additions and 1918 deletions

View File

@@ -1,6 +1,5 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
@@ -46,149 +45,40 @@
android:src="@mipmap/icon_message_delete" />
</FrameLayout>
<ScrollView
<!-- 消息列表:下拉刷新、上拉加载更多 -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#F5F5F5"
android:fillViewport="true"
android:overScrollMode="never"
android:scrollbars="none">
android:background="#F5F5F5">
<LinearLayout
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/refresh_messages"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="24dp">
android:layout_height="match_parent">
<!-- 消息列表 -->
<LinearLayout
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_messages"
android:layout_width="match_parent"
android:layout_height="160dp"
android:layout_marginTop="10dp"
android:background="@android:color/white"
android:orientation="vertical">
android:layout_height="match_parent"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingTop="10dp"
android:paddingBottom="24dp"
android:scrollbars="none" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="80dp">
<FrameLayout
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:background="@drawable/message_avatar_bg">
<ImageView
android:layout_width="27dp"
android:layout_height="23dp"
android:layout_gravity="center"
android:contentDescription="@null"
android:src="@drawable/message_bubble_icon" />
</FrameLayout>
<TextView
style="@style/HomeText"
android:layout_width="wrap_content"
android:layout_height="17dp"
android:layout_marginStart="72dp"
android:layout_marginTop="20dp"
android:text="@string/message_system_notice"
android:textColor="#222222"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
style="@style/HomeText"
android:layout_width="wrap_content"
android:layout_height="17dp"
android:layout_gravity="end|top"
android:layout_marginTop="20dp"
android:layout_marginEnd="16dp"
android:text="@string/message_yesterday"
android:textColor="#666666"
android:textSize="14sp" />
<TextView
style="@style/HomeText"
android:layout_width="match_parent"
android:layout_height="17dp"
android:layout_marginStart="72dp"
android:layout_marginTop="43dp"
android:layout_marginEnd="16dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/message_maintenance"
android:textColor="#666666"
android:textSize="14sp" />
</FrameLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="#DDDDDD" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="79.5dp">
<androidx.cardview.widget.CardView
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="16dp"
android:layout_marginTop="15.5dp"
app:cardBackgroundColor="#F5F5F5"
app:cardCornerRadius="24dp"
app:cardElevation="0dp"
app:cardPreventCornerOverlap="false">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@null"
android:scaleType="centerCrop"
android:src="@mipmap/ic_launcher" />
</androidx.cardview.widget.CardView>
<TextView
style="@style/HomeText"
android:layout_width="wrap_content"
android:layout_height="17dp"
android:layout_marginStart="72dp"
android:layout_marginTop="19.5dp"
android:text="@string/message_system_notice"
android:textColor="#222222"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
style="@style/HomeText"
android:layout_width="wrap_content"
android:layout_height="17dp"
android:layout_gravity="end|top"
android:layout_marginTop="19.5dp"
android:layout_marginEnd="16dp"
android:text="@string/message_yesterday"
android:textColor="#666666"
android:textSize="14sp" />
<TextView
style="@style/HomeText"
android:layout_width="match_parent"
android:layout_height="17dp"
android:layout_marginStart="72dp"
android:layout_marginTop="42.5dp"
android:layout_marginEnd="16dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/message_maintenance"
android:textColor="#666666"
android:textSize="14sp" />
</FrameLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
<!-- 加载中 / 空列表 / 加载失败提示,列表有数据时隐藏 -->
<TextView
android:id="@+id/tv_message_state"
style="@style/HomeText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:paddingBottom="60dp"
android:text="@string/message_empty"
android:textColor="#999999"
android:textSize="14sp"
android:visibility="gone" />
</FrameLayout>
</LinearLayout>