feat: 国际出港/进港全选按钮新增图标切换与反向同步

- 全选/未选图标替换为新的 vector drawable,抽出 setIVCheckAllImage BindingAdapter 集中管理
- 列表项取消选中或上拉加载新数据后,左下角全选按钮自动反向同步
- 修复 isAllChecked.observeForever 反模式:导致取消单项时全部被取消、单项点击无响应

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-21 18:48:59 +08:00
parent e2bda80e33
commit 07f50fdfc7
84 changed files with 313 additions and 260 deletions

View File

@@ -245,7 +245,7 @@
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginLeft="2dp"
android:src="@mipmap/img_all_check" />
android:src="@drawable/img_check_all_unchecked" />
<LinearLayout
android:layout_width="0dp"

View File

@@ -263,9 +263,9 @@
<ImageView
android:id="@+id/checkIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/img_all_check" />
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/img_check_all_unchecked" />
<LinearLayout
android:layout_width="0dp"

View File

@@ -159,7 +159,7 @@
android:layout_height="30dp"
android:layout_marginLeft="5dp"
android:onClick="@{viewModel::onAllClick}"
android:src="@drawable/img_check_all" />
android:src="@drawable/img_check_all_unchecked" />
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -204,7 +204,7 @@
android:layout_height="30dp"
android:layout_marginLeft="5dp"
android:onClick="@{viewModel::selectAllClick}"
android:src="@drawable/img_check_all" />
android:src="@drawable/img_check_all_unchecked" />
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -194,7 +194,7 @@
android:layout_height="30dp"
android:layout_marginLeft="5dp"
android:onClick="@{viewModel::onAllClick}"
android:src="@drawable/img_check_all" />
android:src="@drawable/img_check_all_unchecked" />
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -145,10 +145,11 @@
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all" />
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"

View File

@@ -158,10 +158,11 @@
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all" />
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"

View File

@@ -155,10 +155,11 @@
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all" />
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"

View File

@@ -194,10 +194,11 @@
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all" />
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"

View File

@@ -143,10 +143,11 @@
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all" />
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"

View File

@@ -139,10 +139,11 @@
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all" />
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"

View File

@@ -143,10 +143,11 @@
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all" />
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"

View File

@@ -162,10 +162,11 @@
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all" />
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"

View File

@@ -137,10 +137,11 @@
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all" />
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"