Compare commits

...

4 Commits

Author SHA1 Message Date
e193e93c74 style: 替换全局展开/收起图标并微调 padding
将 ic_new_expand 替换为线条更简洁的 ic_new_expand_1,
同时把按钮内边距从 4dp 调整为 2dp,让图标在 36dp 容器内更舒展。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 20:24:46 +08:00
c05608c5f1 fix: 修复国际进港电报详情只读状态下无法滚动
只读态原本通过 EditText.enabled=false 表达,但会一并吞掉触摸滚动手势,
导致文字较多时无法上下查看。改用 focusable/focusableInTouchMode/
cursorVisible/keyListener 组合表达不可编辑,同时保持 enabled=true,
两种状态下文本均可滚动。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 20:24:36 +08:00
76e613623a style: 修正国际进港舱单详情标题与装机列表列宽
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 20:03:36 +08:00
df3abe32a2 style: 统一工具栏图标间距规范并补全 CLAUDE.md
将 5 个含「全部展开」按钮的列表页 marginStart 从 8dp 改为 16dp,与进港舱单页面对齐;在 CLAUDE.md 补全 img_delete、ic_new_expand 尺寸及图标间距统一规范,避免未来再次出现 8dp/16dp 并存。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 20:03:31 +08:00
13 changed files with 67 additions and 39 deletions

View File

@@ -1101,7 +1101,12 @@ Glide.with(itemView.context).load(glideUrl).into(binding.ivThumbnail)
- 标题栏统一用 `title_tool_bar` — 禁止手动编写 Toolbar
- 优先使用 PadDataLayoutNew 和 PadSearchLayout 组件
- 在每个页面布局时,如有截图,务必尽可能还原图片上的页面设计,而不是推测假想。如有困难一律要询问,禁止自己想象
- 工具栏图标尺寸规范: `img_search` 36dp + padding 2dp`img_add` 40dp 无 padding使用 `drawable/img_add.xml` 矢量图,`drawable-xhdpi/img_add.png` 已废弃删除)
- 工具栏图标尺寸规范:
- `img_search` 36dp + padding 2dp
- `img_add` 40dp 无 padding使用 `drawable/img_add.xml` 矢量图,`drawable-xhdpi/img_add.png` 已废弃删除)
- `img_delete` 36dp + padding 4dp
- `ic_new_expand`(全部展开/收起36dp + padding 4dp
- **图标之间间距统一 `marginStart=16dp`**(禁止使用 8dp会导致视觉过近
- 常用资源: `bg_white_radius_8``colorPrimary``text_normal``text_gray``color_bottom_layout`
### 环境配置

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="1408dp"
android:height="1024dp"
android:viewportWidth="1408"
android:viewportHeight="1024">
<path
android:fillColor="#599dff"
android:pathData="M1327.05296 200.971963H427.464174c-38.280374 0-76.560748-38.280374-76.560747-76.560748s31.900312-76.560748 76.560747-76.560748h899.588786c38.280374 0 76.560748 38.280374 76.560747 76.560748s-31.900312 76.560748-76.560747 76.560748zM669.906542 519.975078v-12.760125c-6.380062-19.140187-12.760125-31.900312-25.520249-44.660436l-25.520249-25.520249h708.186916c44.660436 0 76.560748 31.900312 76.560747 76.560748s-31.900312 76.560748-76.560747 76.560747H618.866044l25.520249-25.520249c12.760125-12.760125 19.140187-25.520249 25.520249-44.660436zM350.903427 513.595016L25.520249 169.071651C12.760125 149.931464 0 130.791277 0 98.890966s12.760125-51.040498 25.520249-70.180686c38.280374-38.280374 95.700935-38.280374 133.981309 0l382.803738 401.943926 25.520249 25.520249c12.760125 12.760125 19.140187 25.520249 25.520249 44.660436V513.595016c-6.380062 25.520249-12.760125 38.280374-25.520249 51.040498L542.305296 590.155763 159.501558 992.099688c-19.140187 19.140187-44.660436 31.900312-63.800623 31.900312-25.520249 0-51.040498-12.760125-63.800623-31.900312-19.140187-12.760125-31.900312-38.280374-31.900312-63.800623s12.760125-51.040498 25.520249-70.180685L350.903427 513.595016z m76.560747 312.623053h899.588786c38.280374 0 76.560748 38.280374 76.560747 76.560747s-31.900312 76.560748-76.560747 76.560748H427.464174c-38.280374 0-76.560748-38.280374-76.560747-76.560748s38.280374-76.560748 76.560747-76.560747z" />
</vector>

View File

@@ -0,0 +1,24 @@
<!--
~ Copyright (C) 2026 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="256dp"
android:height="256dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M512,896l320,-320L192,576zM512,128l320,320L192,448z"
android:fillColor="#1c8cf5"/>
</vector>

View File

@@ -99,11 +99,11 @@
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginStart="8dp"
android:layout_marginStart="16dp"
android:onClick="@{()-> viewModel.toggleAllExpand()}"
android:padding="4dp"
android:padding="2dp"
android:scaleType="fitCenter"
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand : R.drawable.ic_new_expand}"
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand_1 : R.drawable.ic_new_expand_1}"
android:contentDescription="展开/收起全部子列表" />
</LinearLayout>

View File

@@ -108,13 +108,13 @@
<!-- 全局展开/收起按钮 -->
<ImageView
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand : R.drawable.ic_new_expand}"
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand_1 : R.drawable.ic_new_expand_1}"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginStart="8dp"
android:layout_marginStart="16dp"
android:contentDescription="展开/收起全部子列表"
android:onClick="@{()-> viewModel.toggleAllExpand()}"
android:padding="4dp"
android:padding="2dp"
android:scaleType="fitCenter" />
</LinearLayout>

View File

@@ -100,11 +100,11 @@
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginStart="8dp"
android:layout_marginStart="16dp"
android:onClick="@{()-> viewModel.toggleAllExpand()}"
android:padding="4dp"
android:padding="2dp"
android:scaleType="fitCenter"
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand : R.drawable.ic_new_expand}"
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand_1 : R.drawable.ic_new_expand_1}"
android:contentDescription="展开/收起全部子列表" />
</LinearLayout>

View File

@@ -25,6 +25,17 @@ class IntArrTelegramDetailsActivity : BaseBindingActivity<ActivityIntArrTelegram
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际进港电报详情")
binding.viewModel = viewModel
val originalKeyListener = binding.etContent.keyListener
viewModel.isEditable.observe(this) { editable ->
binding.etContent.apply {
isFocusable = editable
isFocusableInTouchMode = editable
isCursorVisible = editable
keyListener = if (editable) originalKeyListener else null
}
}
viewModel.initOnCreated(intent)
}

View File

@@ -29,7 +29,7 @@ class IntImpManifestDetailsActivity :
override fun viewModelClass() = IntImpManifestDetailsViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("进港舱单详情")
setBackArrow("国际进港舱单详情")
binding.viewModel = viewModel
viewModel.initOnCreated(intent)

View File

@@ -97,10 +97,10 @@
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginStart="8dp"
android:layout_marginStart="16dp"
android:onClick="@{()-> viewModel.toggleAllExpand()}"
android:padding="4dp"
android:src="@drawable/ic_new_expand" />
android:padding="2dp"
android:src="@drawable/ic_new_expand_1" />
</LinearLayout>

View File

@@ -29,7 +29,6 @@
android:padding="20dp"
android:gravity="top|start"
android:text="@={viewModel.telegramContent}"
android:enabled="@{viewModel.isEditable}"
android:textColor="@color/black"
android:textSize="16sp"
android:lineSpacingExtra="4dp"

View File

@@ -130,8 +130,8 @@
android:layout_height="36dp"
android:layout_marginStart="16dp"
android:onClick="@{()-> viewModel.toggleAllExpand()}"
android:padding="4dp"
android:src="@drawable/ic_new_expand" />
android:padding="2dp"
android:src="@drawable/ic_new_expand_1" />
</LinearLayout>

View File

@@ -108,13 +108,13 @@
<!-- 全局展开/收起按钮 -->
<ImageView
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand : R.drawable.ic_new_expand}"
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand_1 : R.drawable.ic_new_expand_1}"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginStart="8dp"
android:layout_marginStart="16dp"
android:contentDescription="展开/收起全部子列表"
android:onClick="@{()-> viewModel.toggleAllExpand()}"
android:padding="4dp"
android:padding="2dp"
android:scaleType="fitCenter" />
</LinearLayout>

View File

@@ -55,11 +55,11 @@
android:gravity="center_vertical"
android:orientation="horizontal">
<!-- 运单号 (weight=1.5) -->
<!-- 运单号 (weight=1.0) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:layout_weight="1.0"
android:gravity="center_vertical"
android:orientation="horizontal">
@@ -103,11 +103,11 @@
</LinearLayout>
<!-- ULD编号 (weight=1.5) -->
<!-- ULD编号 (weight=1.0) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:layout_weight="1.0"
android:gravity="center_vertical"
android:orientation="horizontal">
@@ -182,11 +182,11 @@
android:gravity="center_vertical"
android:orientation="horizontal">
<!-- 品名 (weight=1.5) -->
<!-- 品名 (weight=1.0) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:layout_weight="1.0"
android:gravity="center_vertical"
android:orientation="horizontal">
@@ -228,11 +228,11 @@
</LinearLayout>
<!-- 库位号 (weight=1.5) -->
<!-- 库位号 (weight=1.0) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:layout_weight="1.0"
android:gravity="center_vertical"
android:orientation="horizontal">