- 添加 SizeTool 工具类统一管理 Flexbox 布局尺寸计算 - 在 MasterScaleActivity 中使用 SizeTool 替代硬编码计算 - 在 SeasoningConfigFragment 中使用 SizeTool 重构尺寸计算 - 在 SlaveActivity 中应用统一的尺寸计算方法 - 更新 Seasoning18GridAdapter 和 Seasoning22GridAdapter 使用现代化布局参数设置 - 调整 fragment_seasoning_config.xml 中的边距和内边距数值 - 为布局文件添加 tools:itemCount 属性支持预览功能
66 lines
2.6 KiB
XML
66 lines
2.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
tools:background="@color/bg_color">
|
|
|
|
<!-- 顶部标题 -->
|
|
<TextView
|
|
android:id="@+id/tvMasterTitle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal"
|
|
android:layout_marginTop="10dp"
|
|
android:layout_marginBottom="10dp"
|
|
android:text="全设备秤数据监控"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
android:textColor="@color/home_title"
|
|
android:textSize="36sp"
|
|
android:textStyle="bold" />
|
|
|
|
<!-- 主设备连接状态栏 -->
|
|
<TextView
|
|
android:id="@+id/tvConnectionStatus"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintTop_toBottomOf="@id/tvMasterTitle"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
android:layout_marginBottom="16dp"
|
|
android:textColor="@color/home_sub_title"
|
|
android:textSize="24sp"
|
|
tools:text="已发现设备:3 台" />
|
|
|
|
<ImageView
|
|
android:id="@+id/ivMasterBack"
|
|
android:layout_width="70dp"
|
|
android:layout_height="60dp"
|
|
android:layout_gravity="start"
|
|
android:paddingStart="30dp"
|
|
android:paddingEnd="10dp"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="@id/tvMasterTitle"
|
|
app:layout_constraintBottom_toBottomOf="@id/tvMasterTitle"
|
|
android:src="@drawable/ic_back"
|
|
tools:ignore="ContentDescription" />
|
|
|
|
<!-- 秤数据列表 -->
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/rvScaleList"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_marginStart="5dp"
|
|
android:layout_marginEnd="5dp"
|
|
android:layout_marginTop="8dp"
|
|
app:layout_constraintTop_toBottomOf="@id/tvConnectionStatus"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
android:overScrollMode="never"
|
|
tools:itemCount="4"
|
|
tools:listitem="@layout/list_type_scale22"/>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|