Compare commits
4 Commits
b18f2cfe1f
...
e193e93c74
| Author | SHA1 | Date | |
|---|---|---|---|
| e193e93c74 | |||
| c05608c5f1 | |||
| 76e613623a | |||
| df3abe32a2 |
@@ -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`
|
||||
|
||||
### 环境配置
|
||||
|
||||
@@ -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>
|
||||
24
module_base/src/main/res/drawable/ic_new_expand_1.xml
Normal file
24
module_base/src/main/res/drawable/ic_new_expand_1.xml
Normal 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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user