85 lines
3.2 KiB
XML
85 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:background="@android:color/white"
|
||
android:fitsSystemWindows="true"
|
||
android:orientation="vertical">
|
||
|
||
<!-- 标题栏:48dp,右侧清空按钮 -->
|
||
<FrameLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="48dp"
|
||
android:background="@android:color/white">
|
||
|
||
<ImageView
|
||
android:id="@+id/iv_back"
|
||
android:layout_width="22dp"
|
||
android:layout_height="22dp"
|
||
android:layout_gravity="start|center_vertical"
|
||
android:layout_marginStart="16dp"
|
||
android:clickable="true"
|
||
android:contentDescription="@string/message_center_back"
|
||
android:focusable="true"
|
||
android:src="@mipmap/icon_product_inbound_back" />
|
||
|
||
<TextView
|
||
style="@style/HomeText"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:gravity="center"
|
||
android:text="@string/message_center_title"
|
||
android:textColor="#222222"
|
||
android:textSize="16sp"
|
||
android:textStyle="bold" />
|
||
|
||
<ImageView
|
||
android:id="@+id/iv_clear"
|
||
android:layout_width="24dp"
|
||
android:layout_height="24dp"
|
||
android:layout_gravity="end|center_vertical"
|
||
android:layout_marginEnd="16dp"
|
||
android:clickable="true"
|
||
android:contentDescription="@string/message_center_clear"
|
||
android:focusable="true"
|
||
android:src="@mipmap/icon_message_delete" />
|
||
</FrameLayout>
|
||
|
||
<!-- 消息列表:下拉刷新、上拉加载更多 -->
|
||
<FrameLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="0dp"
|
||
android:layout_weight="1"
|
||
android:background="#F5F5F5">
|
||
|
||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||
android:id="@+id/refresh_messages"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent">
|
||
|
||
<androidx.recyclerview.widget.RecyclerView
|
||
android:id="@+id/rv_messages"
|
||
android:layout_width="match_parent"
|
||
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>
|
||
|
||
<!-- 加载中 / 空列表 / 加载失败提示,列表有数据时隐藏 -->
|
||
<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>
|