style(gjc): 开始组装页运单列表 5 列间距均分,表头两种状态各用一套列宽
- 新增 AssembleWaybillColumns:「件数/重量」与「剩余件数/总件数」两种表头状态 各一套列宽,表头按 hasLoadedOnce、列表项按 showRemaining 切换,保证列对齐 - 件数与重量之间加弹性间隔;剩余态重量列放宽到 140dp,大重量不换行 - module_base 新增通用 layoutWeight 绑定适配器 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
|
||||
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||
|
||||
<import type="com.lukouguoji.gjc.page.assemble.AssembleWaybillColumns" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjc.viewModel.IntExpAssembleStartViewModel" />
|
||||
@@ -179,7 +181,7 @@
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.WB_NO, viewModel.hasLoadedOnce)}"
|
||||
android:gravity="center"
|
||||
android:text="运单号"
|
||||
android:textColor="@color/text_normal"
|
||||
@@ -187,17 +189,25 @@
|
||||
|
||||
<!-- 件数 -->
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.PIECES, viewModel.hasLoadedOnce)}"
|
||||
android:gravity="center"
|
||||
android:text='@{viewModel.hasLoadedOnce ? "剩余件数/总件数" : "件数"}'
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<!-- 件数与重量列间距(列宽见 AssembleWaybillColumns) -->
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.GAP, viewModel.hasLoadedOnce)}" />
|
||||
|
||||
<!-- 重量 -->
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.WEIGHT, viewModel.hasLoadedOnce)}"
|
||||
android:gravity="center"
|
||||
android:text='@{viewModel.hasLoadedOnce ? "剩余重量/总重量" : "重量"}'
|
||||
android:textColor="@color/text_normal"
|
||||
@@ -207,7 +217,7 @@
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.FLIGHT, viewModel.hasLoadedOnce)}"
|
||||
android:gravity="center"
|
||||
android:text="配载航班"
|
||||
android:textColor="@color/text_normal"
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="com.lukouguoji.gjc.page.assemble.AssembleWaybillColumns" />
|
||||
|
||||
<variable
|
||||
name="bean"
|
||||
type="com.lukouguoji.module_base.bean.AssembleWaybillBean" />
|
||||
@@ -44,7 +46,7 @@
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.WB_NO, bean.showRemaining)}"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.waybillNo}"
|
||||
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
||||
@@ -52,17 +54,25 @@
|
||||
|
||||
<!-- 件数 -->
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.PIECES, bean.showRemaining)}"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.piecesDisplay}"
|
||||
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 件数与重量列间距(列宽见 AssembleWaybillColumns) -->
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.GAP, bean.showRemaining)}" />
|
||||
|
||||
<!-- 重量 -->
|
||||
<TextView
|
||||
android:layout_width="120dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.WEIGHT, bean.showRemaining)}"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.weightDisplay}"
|
||||
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
||||
@@ -72,7 +82,7 @@
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.FLIGHT, bean.showRemaining)}"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.fLightInfo}"
|
||||
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
||||
|
||||
Reference in New Issue
Block a user