From 5e1e9e58a2c9a57e7acf15867cdb9bf00b7bb6d1 Mon Sep 17 00:00:00 2001 From: YANGJIANKUAN Date: Mon, 26 Jan 2026 13:43:49 +0800 Subject: [PATCH] feat: fix int exp arrive sub list --- .../src/main/res/drawable/ic_new_expand.xml | 11 ++ .../gjc/holder/IntExpArriveSubViewHolder.kt | 26 ++++ .../gjc/holder/IntExpArriveViewHolder.kt | 4 +- .../res/layout/activity_int_exp_arrive.xml | 4 +- .../layout/activity_int_exp_storage_use.xml | 4 +- .../res/layout/activity_int_exp_tally.xml | 4 +- .../res/layout/item_int_exp_arrive_sub.xml | 140 ++++++++++++++++++ 7 files changed, 185 insertions(+), 8 deletions(-) create mode 100644 module_base/src/main/res/drawable/ic_new_expand.xml create mode 100644 module_gjc/src/main/java/com/lukouguoji/gjc/holder/IntExpArriveSubViewHolder.kt create mode 100644 module_gjc/src/main/res/layout/item_int_exp_arrive_sub.xml diff --git a/module_base/src/main/res/drawable/ic_new_expand.xml b/module_base/src/main/res/drawable/ic_new_expand.xml new file mode 100644 index 0000000..a2ddaa7 --- /dev/null +++ b/module_base/src/main/res/drawable/ic_new_expand.xml @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/module_gjc/src/main/java/com/lukouguoji/gjc/holder/IntExpArriveSubViewHolder.kt b/module_gjc/src/main/java/com/lukouguoji/gjc/holder/IntExpArriveSubViewHolder.kt new file mode 100644 index 0000000..8a11ee0 --- /dev/null +++ b/module_gjc/src/main/java/com/lukouguoji/gjc/holder/IntExpArriveSubViewHolder.kt @@ -0,0 +1,26 @@ +package com.lukouguoji.gjc.holder + +import android.view.View +import com.lukouguoji.gjc.databinding.ItemIntExpArriveSubBinding +import com.lukouguoji.module_base.base.BaseViewHolder +import com.lukouguoji.module_base.bean.GjcHaWb + +/** + * 国际出港-出港理货 子订单(分单) ViewHolder + */ +class IntExpArriveSubViewHolder(view: View) : + BaseViewHolder(view) { + + override fun onBind(item: Any?, position: Int) { + val bean = getItemBean(item) ?: return + binding.bean = bean + binding.position = position + 1 // 序号从 1 开始 + binding.executePendingBindings() + + // checkbox点击切换选择状态 + binding.ivCheckbox.setOnClickListener { + bean.checked.set(!bean.checked.get()) + binding.executePendingBindings() + } + } +} diff --git a/module_gjc/src/main/java/com/lukouguoji/gjc/holder/IntExpArriveViewHolder.kt b/module_gjc/src/main/java/com/lukouguoji/gjc/holder/IntExpArriveViewHolder.kt index b1a9ac4..e46dafc 100644 --- a/module_gjc/src/main/java/com/lukouguoji/gjc/holder/IntExpArriveViewHolder.kt +++ b/module_gjc/src/main/java/com/lukouguoji/gjc/holder/IntExpArriveViewHolder.kt @@ -37,8 +37,8 @@ class IntExpArriveViewHolder(view: View) : // ========== 初始化子列表 RecyclerView ========== setCommonAdapter( binding.rvSub, - IntExpTallySubViewHolder::class.java, - R.layout.item_int_exp_tally_sub + IntExpArriveSubViewHolder::class.java, + R.layout.item_int_exp_arrive_sub ) // 刷新子列表数据 diff --git a/module_gjc/src/main/res/layout/activity_int_exp_arrive.xml b/module_gjc/src/main/res/layout/activity_int_exp_arrive.xml index 808f803..eefb2b1 100644 --- a/module_gjc/src/main/res/layout/activity_int_exp_arrive.xml +++ b/module_gjc/src/main/res/layout/activity_int_exp_arrive.xml @@ -101,9 +101,9 @@ android:layout_height="36dp" android:layout_marginStart="8dp" android:onClick="@{()-> viewModel.toggleAllExpand()}" - android:padding="2dp" + android:padding="4dp" android:scaleType="fitCenter" - loadImage="@{viewModel.isAllExpanded ? R.mipmap.img_up : R.mipmap.img_down}" + loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand : R.drawable.ic_new_expand}" android:contentDescription="展开/收起全部子列表" /> diff --git a/module_gjc/src/main/res/layout/activity_int_exp_storage_use.xml b/module_gjc/src/main/res/layout/activity_int_exp_storage_use.xml index 158303f..7e95c1a 100644 --- a/module_gjc/src/main/res/layout/activity_int_exp_storage_use.xml +++ b/module_gjc/src/main/res/layout/activity_int_exp_storage_use.xml @@ -108,13 +108,13 @@ diff --git a/module_gjc/src/main/res/layout/activity_int_exp_tally.xml b/module_gjc/src/main/res/layout/activity_int_exp_tally.xml index 1104468..1e485cd 100644 --- a/module_gjc/src/main/res/layout/activity_int_exp_tally.xml +++ b/module_gjc/src/main/res/layout/activity_int_exp_tally.xml @@ -102,9 +102,9 @@ android:layout_height="36dp" android:layout_marginStart="8dp" android:onClick="@{()-> viewModel.toggleAllExpand()}" - android:padding="2dp" + android:padding="4dp" android:scaleType="fitCenter" - loadImage="@{viewModel.isAllExpanded ? R.mipmap.img_up : R.mipmap.img_down}" + loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand : R.drawable.ic_new_expand}" android:contentDescription="展开/收起全部子列表" /> diff --git a/module_gjc/src/main/res/layout/item_int_exp_arrive_sub.xml b/module_gjc/src/main/res/layout/item_int_exp_arrive_sub.xml new file mode 100644 index 0000000..7b11583 --- /dev/null +++ b/module_gjc/src/main/res/layout/item_int_exp_arrive_sub.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +