feat: 国际出港/进港全选按钮新增图标切换与反向同步
- 全选/未选图标替换为新的 vector drawable,抽出 setIVCheckAllImage BindingAdapter 集中管理 - 列表项取消选中或上拉加载新数据后,左下角全选按钮自动反向同步 - 修复 isAllChecked.observeForever 反模式:导致取消单项时全部被取消、单项点击无响应 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user