feat: opt ui
This commit is contained in:
@@ -83,8 +83,8 @@
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
|
||||
@@ -89,17 +89,17 @@
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
style="@style/iv_search_action"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
<!-- 添加按钮 -->
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:onClick="@{()-> viewModel.addClick()}"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/img_add" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -128,7 +128,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/color_bottom_layout"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{"合计:"+viewModel.totalCount+"票"}'
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="合计:1票" />
|
||||
@@ -154,7 +154,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{"总件数:"+viewModel.totalPc}'
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="总件数:100" />
|
||||
@@ -164,7 +164,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{"总重量:"+viewModel.totalWeight}'
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="总重量:100" />
|
||||
@@ -174,7 +174,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{"总货重:"+viewModel.cargoWeight}'
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="总货重:150" />
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
android:padding="15dp">
|
||||
|
||||
<!-- 第一部分:前2行表单(左侧2列)+ 地磅称重(右侧) -->
|
||||
<LinearLayout
|
||||
@@ -84,7 +84,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
@@ -171,7 +171,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
@@ -212,7 +212,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
@@ -254,7 +254,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
@@ -295,7 +295,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
@@ -335,7 +335,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
@@ -367,7 +367,7 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:padding="15dp">
|
||||
|
||||
<Space
|
||||
|
||||
@@ -90,8 +90,8 @@
|
||||
|
||||
<!-- 搜索按钮 -->
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
|
||||
@@ -79,8 +79,8 @@
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:background="@null"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
@@ -86,23 +86,26 @@
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
style="@style/iv_search_action"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
<!-- 加号按钮 -->
|
||||
<ImageView
|
||||
style="@style/iv_search_action"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:onClick="@{()-> viewModel.onAddClick()}"
|
||||
android:src="@drawable/img_add"
|
||||
android:layout_marginLeft="10dp" />
|
||||
android:layout_marginLeft="15dp" />
|
||||
|
||||
<!-- 删除按钮 -->
|
||||
<ImageView
|
||||
style="@style/iv_search_action"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:onClick="@{()-> viewModel.onDeleteClick()}"
|
||||
android:src="@drawable/img_delete"
|
||||
android:layout_marginLeft="10dp" />
|
||||
android:layout_marginLeft="15dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -132,7 +135,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/color_bottom_layout"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
@@ -148,7 +151,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{"合计:"+viewModel.totalCount+"票"}'
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -157,7 +160,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{"总件数:"+viewModel.totalPieces}'
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -166,7 +169,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{"总重量:"+viewModel.totalWeight}'
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
@@ -92,8 +92,8 @@
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:src="@drawable/img_search" />
|
||||
</LinearLayout>
|
||||
@@ -126,15 +126,27 @@
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<!-- 全选 -->
|
||||
<CheckBox
|
||||
android:id="@+id/cbSelectAll"
|
||||
<!-- 全选按钮区域 (图标+文字) -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{()-> viewModel.toggleSelectAll()}"
|
||||
android:text="全选"
|
||||
android:textColor="@color/c666666"
|
||||
android:textSize="16sp" />
|
||||
android:gravity="center_vertical"
|
||||
android:onClick="@{()-> viewModel.toggleSelectAll()}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="全选"
|
||||
android:textColor="@color/c666666"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:src="@drawable/img_check_all" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 统计信息 -->
|
||||
<LinearLayout
|
||||
|
||||
@@ -77,8 +77,8 @@
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View" />
|
||||
@@ -24,19 +25,14 @@
|
||||
android:padding="15dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- 左侧:CheckBox -->
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="@{bean.isSelected}"
|
||||
android:clickable="false"
|
||||
android:focusable="false" />
|
||||
|
||||
<!-- 中间:飞机图标 -->
|
||||
<!-- 飞机图标 - 作为选择指示器(根据checked状态切换图片) -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_gravity="center"
|
||||
app:loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
|
||||
android:src="@drawable/img_plane"
|
||||
android:contentDescription="@string/app_name" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user