diff --git a/.claude/skills/phone-adapt/SKILL.md b/.claude/skills/phone-adapt/SKILL.md index f2f520a..274350c 100644 --- a/.claude/skills/phone-adapt/SKILL.md +++ b/.claude/skills/phone-adapt/SKILL.md @@ -183,14 +183,16 @@ if (DeviceUtil.isPhone()) viewModel.initPhoneExtras() 手机端首页是 `module_p` 的 `PDAEnterActivity`,「国际」Tab 的菜单在 `module_p/.../ui/enter/gj/GjViewModel.kt`(国内在 `gn/GnViewModel.kt`)。 **菜单是手写清单,不是接口下发**;权限串只做过滤(`authList.contains(bean.key)`)。 +2026-10-21 起清单按 `documents/5.5寸首页新样式/` 设计稿分组(`PdaMenuGroup`),新入口加进对应分组。 适配完页面不回来加一行,手机上就**根本没有入口**——出库交接第一版就漏了这步, 只能靠 adb 直启才能进去。加法: ```kotlin +// 加在 GjViewModel.groups 的「国际出港」分组里 ActionBean( "出港移库", - R.drawable.gjc_yi_ku_icon, // 图标复用 Pad 同款,复制 PNG 到 module_p/res/drawable-xxhdpi/ + R.drawable.img_pda_menu_gjc_move, // 设计稿宫格图标(icons/ 源图转 PNG 放 drawable-nodpi,放 xxhdpi 会糊);没有新图标的沿用旧图标 Constant.AuthName.GjcYiKuListActivity, // 权限串与 Pad 端菜单一致 ARouterConstants.ACTIVITY_URL_INT_EXP_MOVE // 填了 route 就走通用跳转,无需 when 分支 ), diff --git a/CHANGELOG.md b/CHANGELOG.md index 10ee09e..36b8fb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,18 @@ ## [Unreleased] ### 变更 (Changed) +- 【5.5 寸首页改版 · 2026-10-21】手持端首页 `PDAEnterActivity` 四个 Tab 按 `documents/5.5寸首页新样式/` 设计稿 + 1:1 还原(仅 module_p,平板不经过该页,零影响): + ① 国内/国际 Tab 改为「分组标题栏 + 三列宫格」(新增 `PdaMenuGroup` / `PdaMenuRenderer`),分组与顺序按设计稿, + 20 个入口换设计稿新图标(源 GIF/PNG 统一转 PNG 放 drawable-nodpi——放 xxhdpi 实测解码后再放大发糊), + 设计稿未画的入口追加到组尾沿用旧图标; + 权限过滤 `authList.contains(key)` 与改版前逐字一致——ADMIN 账号改版前后入口集合 diff 为空(国内 9、国际 12), + 21 个入口逐个点击跳转目标与原映射一致。 + ② 首页航班动态改为卡片 + 国内/国际、进港/出港分段 + 日期卡片(‹ › 前后翻日)+ 浅色表格 + 右下设置悬浮钮; + 默认方向按设计稿改为「进港」;日期改为补零格式(原选择器会写出 `2026-10-5`),选择器从当前选中日期打开。 + ③ 底部 Tab 栏、消息铃铛与角标、状态栏(#3B71E8)按设计稿重做(Tab 图标 16dp 并与文字水平居中, + 不照搬设计稿偏左上的 16px 图形),「我的」顶栏同步新导航栏样式;分段控件 padding 计入 1dp 描边以上下居中;消息铃铛四个 Tab 统一按国内/国际设计稿位置(首页设计稿略有偏差),切 Tab 不再移动; + 首页 AutoSize 基准由 400 改为设计稿画布 390。删除 module_p 中不再引用的旧菜单/Tab 图标副本 19 个。 - 【手机适配分支合入主干 · 2026-10-11】`feature/phone-ui-adaptation` 合并入 `main`,此后平板与 5.5 寸手机只在 `main` 上同时开发。合并以平板业务为准: ① 主干 58 个平板提交(运抵海关放行/运抵状态筛选/海关回执、出库交接装机状态/允许装机、出港移库详情与侧滑编辑、 diff --git a/CLAUDE.md b/CLAUDE.md index dbd6a80..a12ee7b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1012,9 +1012,11 @@ Manifest 写死 `userLandscape` 时,即使 `BaseActivity` 在 `super.onCreate` | 国内 | `GnViewModel` | `module_p/.../ui/enter/gn/` | | 国际 | `GjViewModel` | `module_p/.../ui/enter/gj/` | -**菜单项是手写清单,不是接口下发**。权限机制只做过滤:登录返回的权限串存在 -`SharedPreferenceUtil.getString(Constant.Share.authList)`(一个逗号分隔的长字符串), -菜单项按 `authList.contains(bean.key)` 决定显不显示。 +**菜单项是手写清单,不是接口下发**。登录接口只下发「分组 → 权限码」(`auths`,形如 +`{"IntExp":["AppIntExpCheckWeighing",…],"Supervision":[…]}`,存在 +`SharedPreferenceUtil.getString(Constant.Share.authList)`),菜单名称/图标/跳转在平板和手机上都是前端写死的映射。 +手机端菜单项按 `authList.contains(bean.key)` 决定显不显示(`PdaMenuGroup.kt` 的 `filterByAuth()`, +**2026-10-21 首页改版时刻意保持与改版前逐字一致**,保证同一账号的入口集合不变)。 所以「适配完页面但手机首页看不到入口」的原因通常**不是没权限,而是清单里没加**。 排查顺序:先确认权限串里有对应 key,再去看清单。 @@ -1025,25 +1027,43 @@ adb -s shell "run-as com.lukouguoji.aerologic \ cat /data/data/com.lukouguoji.aerologic/shared_prefs/data.xml" | tr ',' '\n' | grep -oE "App[A-Za-z]+" | sort -u ``` -加一项就是加一行 —— `ActionBean` 的第 4 个参数填 ARouter 路由即可,无需写 when 分支 +**2026-10-21 起首页按 `documents/5.5寸首页新样式/` 设计稿改版**:清单按设计稿分组 +(`PdaMenuGroup(标题, 入口列表)`,如国际 Tab =「国际出港 / 国际进港 / 综合管理」), +由 `PdaMenuRenderer` 渲染成「分组标题栏 + 三列宫格」,过滤后为空的分组整组隐藏。 +**分组口径以设计稿为准,不是接口的 auths 分组**(例如单证交接/转运记录在接口里属 Supervision, +设计稿放在「国内出港」)。 + +加一项就是在对应分组里加一行 —— `ActionBean` 的第 4 个参数填 ARouter 路由即可,无需写 when 分支 (`module_p` 只依赖 `module_base`,看不到 `module_gjc` 等业务模块,跨模块只能走路由): ```kotlin -ActionBean( - "出港移库", - R.drawable.gjc_yi_ku_icon, // 图标复用 Pad 端同款 - Constant.AuthName.GjcYiKuListActivity, // 权限串,与 Pad 端菜单保持一致 - ARouterConstants.ACTIVITY_URL_INT_EXP_MOVE // 有 route 就走通用跳转 +PdaMenuGroup( + "国际出港", listOf( + ActionBean( + "出港移库", + R.drawable.img_pda_menu_gjc_move, // 设计稿新版宫格图标 + Constant.AuthName.GjcYiKuListActivity, // 权限串,与 Pad 端菜单保持一致 + ARouterConstants.ACTIVITY_URL_INT_EXP_MOVE // 有 route 就走通用跳转 + ), + … + ) ), ``` -两点注意: +注意: - **权限串与路由都要和 Pad 端菜单对齐**:以 `app/.../HomeFragment.kt` 里该权限对应的 `ARouter.build(...)` 为准。同一业务常有新旧两个 Activity(如移库的 `GjcYiKuListActivity` 与 `IntExpMoveActivity`),Pad 菜单实际跳的才是要适配的那个 -- **图标**:`module_p` 看不到 `module_gjc` 的资源,把 Pad 图标 PNG 复制一份到 - `module_p/src/main/res/drawable-xxhdpi/`(该模块既有 4 个图标就是这么放的,同名不同密度桶可共存) +- **图标**:设计稿图标源文件在 `documents/5.5寸首页新样式/icons/`(约 167px 方图,自带「国际/国内」角标), + 统一转 PNG(源文件多为单帧 GIF,GIF 只有 256 色 + 1 位透明,不进资源)后放 + `module_p/src/main/res/drawable-nodpi/img_pda_menu_*.png`,按 59.7dp 宫格居中裁剪 + 圆角显示。 + **必须放 nodpi,不能放 xxhdpi**:167px 放 xxhdpi 会在 ~295dpi 设备上解码时先缩到 ≈103px,再被拉伸到 + 宫格的 110px,实测明显发糊;nodpi 原尺寸解码、由固定尺寸 ImageView 一次缩小,与浏览器渲染设计稿一致 + **设计稿没有的入口追加到所属分组末尾、沿用旧图标**(如「板箱过磅」`gjc_fu_bang_icon`) +- **改动清单后核对入口集合**:登录后分别在「国内 / 国际」Tab 用 `ui_probe.sh texts`(需滚动)导出入口名, + 与改动前 `LC_ALL=C sort` 后 diff(CJK 文本不加 `LC_ALL=C` 排序不稳定,会 diff 出假差异)。 + ADMIN 测试账号基线:国内 9 个、国际 12 个 **示例:状态 Tab 零 ViewModel 改动**(`IntExpMoveActivity` 已实现) @@ -1313,6 +1333,8 @@ adb shell am start -n com.lukouguoji.aerologic/com.lukouguoji.gjc.activity.IntEx | 布局构建报 `Error: The string "--" is not permitted within comments` | XML 注释中出现连续双横线(如写"兜底 \"--\""),XML 规范禁止 | 注释里改用文字描述(如「兜底双横线」),代码绑定表达式中的 `"--"` 不受影响 | | 多选页手机版点「全选」后底部「已选 N 项」不更新(单卡勾选正常) | 批量勾选在 `checkAllClick` 里直接 set,不走 FlowBus 的单卡 EVENT_CHECK_CHANGED 事件,`selectedCountText` 只在事件回调里更新 | `checkAllClick` 末尾自行同步 `selectedCountText`(平板布局不绑定该字段,无影响) | | 手机版数字输入框(`PhoneFormRow` 双向绑 Double 的 `xxxStr`)输入 "18" 变成 "81" | getter 由 Double 反推字符串("1" → "1.0"),与输入框文本不等触发 `setText`,光标回到开头 | Bean 里保留输入原文(`@Transient` 私有 String),getter 优先返回原文(参考 `GjcCheckInRecord.trayTotalWeightStr`) | +| 固定 dp 尺寸显示的位图图标在手机上发糊(设计稿里很清晰) | 位图放进了比「源像素 ÷ 显示 dp」更高的密度桶(如 167px 的宫格图放 xxhdpi,在 ~295dpi 设备上解码先缩到 103px,再拉伸到 110px 显示) | 只按固定 dp 尺寸显示的设计稿位图放 `drawable-nodpi`(原尺寸解码,View 一次缩小);排查:截图放大对比设计稿,算 `源px × 设备dpi / 桶dpi` 是否小于显示 px | +| 分段/胶囊控件里选中块上下不居中(上窄下宽) | 设计稿 CSS 的 `border` 计入盒子尺寸,而 Android shape 的 `stroke` 画在 background 上、不占 padding——照抄 CSS 的 `padding: 2px` 少了 1dp 描边 | 容器 padding = CSS padding + border 宽度(如 2 + 1 = 3dp),且容器高度用 `wrap_content`——写死 28dp 时 28/3/22dp 各自取整成 px,内框比选中块少 1px,选中块底边被截;用像素列取色(`magick … txt:-`)量上下间隙验证 | | XML 里 `bean.a ?? bean.b` 兜底不生效,字段明明有值却显示占位符 | 网络层转换器把 JSON null 归一成空串 `""`,DataBinding 的 `??` 只判 null 不判空串,永远取到左侧的空串 | 在 Bean 上加计算属性做 `isNullOrEmpty` 双兜底(如 `agentDisplay`),XML 绑计算属性(进港查询/出港查询代理人已踩过) | --- diff --git a/documents/5.5寸首页新样式/5.5设计图html/dashboard.html b/documents/5.5寸首页新样式/5.5设计图html/dashboard.html new file mode 100644 index 0000000..5f7947a --- /dev/null +++ b/documents/5.5寸首页新样式/5.5设计图html/dashboard.html @@ -0,0 +1,881 @@ + + + + + + +首页 + + + + + +
+ +
+
+
+16:48 +
+
+ +
+
+
+ + + +
+
+ +
+
+ + +
+ +
+ + +
+ +
+ + + +
+
+ +
+航班号 +航程 +地区类型 +计划起飞 +
+ +
+
+MU2222 +HFE-PEK +国内 +12:20 +
+
+MU6895 +HFE-LAX +国际 +02:26 +
+
+
+
+ + + + +
+
+ + + diff --git a/documents/5.5寸首页新样式/5.5设计图html/domestic.html b/documents/5.5寸首页新样式/5.5设计图html/domestic.html new file mode 100644 index 0000000..4b7c178 --- /dev/null +++ b/documents/5.5寸首页新样式/5.5设计图html/domestic.html @@ -0,0 +1,535 @@ + + + + + + +国内业务 + + + + + +
+ +
+
+
+16:48 +
+
+ +
+
+
+ + + +
+ +
+
+ +

国内出港

+
+
+ + + + + + +
+
+ +
+
+ +

国内进港

+
+
+ + +
+
+ +
+
+ +

综合管理

+
+
+ +
+
+
+ + +
+
+ + + diff --git a/documents/5.5寸首页新样式/5.5设计图html/home.html b/documents/5.5寸首页新样式/5.5设计图html/home.html new file mode 100644 index 0000000..1cb76ee --- /dev/null +++ b/documents/5.5寸首页新样式/5.5设计图html/home.html @@ -0,0 +1,694 @@ + + + + + + +国际业务 + + + + + +
+ +
+
+
+16:48 +
+
+ +
+
+
+ + + +
+ +
+
+ +

国际出港

+
+
+ + + + + + +
+
+ +
+
+ +

国际进港

+
+
+ + + + +
+
+ +
+
+ +

综合管理

+
+
+ +
+
+
+ + +
+
+ + + diff --git a/documents/5.5寸首页新样式/icons/国内/guonei_03.png b/documents/5.5寸首页新样式/icons/国内/guonei_03.png new file mode 100644 index 0000000..5fb7bd3 Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国内/guonei_03.png differ diff --git a/documents/5.5寸首页新样式/icons/国内/guonei_05.png b/documents/5.5寸首页新样式/icons/国内/guonei_05.png new file mode 100644 index 0000000..2bfed83 Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国内/guonei_05.png differ diff --git a/documents/5.5寸首页新样式/icons/国内/guonei_07.png b/documents/5.5寸首页新样式/icons/国内/guonei_07.png new file mode 100644 index 0000000..ffbfb19 Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国内/guonei_07.png differ diff --git a/documents/5.5寸首页新样式/icons/国内/guonei_13.png b/documents/5.5寸首页新样式/icons/国内/guonei_13.png new file mode 100644 index 0000000..ac94acf Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国内/guonei_13.png differ diff --git a/documents/5.5寸首页新样式/icons/国内/guonei_15.png b/documents/5.5寸首页新样式/icons/国内/guonei_15.png new file mode 100644 index 0000000..d257212 Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国内/guonei_15.png differ diff --git a/documents/5.5寸首页新样式/icons/国内/guonei_17.png b/documents/5.5寸首页新样式/icons/国内/guonei_17.png new file mode 100644 index 0000000..8877a48 Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国内/guonei_17.png differ diff --git a/documents/5.5寸首页新样式/icons/国内/guonei_22.png b/documents/5.5寸首页新样式/icons/国内/guonei_22.png new file mode 100644 index 0000000..8f6c34f Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国内/guonei_22.png differ diff --git a/documents/5.5寸首页新样式/icons/国内/guonei_23.png b/documents/5.5寸首页新样式/icons/国内/guonei_23.png new file mode 100644 index 0000000..48e1e44 Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国内/guonei_23.png differ diff --git a/documents/5.5寸首页新样式/icons/国内/guonei_26.png b/documents/5.5寸首页新样式/icons/国内/guonei_26.png new file mode 100644 index 0000000..668a77d Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国内/guonei_26.png differ diff --git a/documents/5.5寸首页新样式/icons/国际/guoji_03.png b/documents/5.5寸首页新样式/icons/国际/guoji_03.png new file mode 100644 index 0000000..125267c Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国际/guoji_03.png differ diff --git a/documents/5.5寸首页新样式/icons/国际/guoji_07.gif b/documents/5.5寸首页新样式/icons/国际/guoji_07.gif new file mode 100644 index 0000000..24bf33e Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国际/guoji_07.gif differ diff --git a/documents/5.5寸首页新样式/icons/国际/guoji_09.gif b/documents/5.5寸首页新样式/icons/国际/guoji_09.gif new file mode 100644 index 0000000..f0f6142 Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国际/guoji_09.gif differ diff --git a/documents/5.5寸首页新样式/icons/国际/guoji_11.gif b/documents/5.5寸首页新样式/icons/国际/guoji_11.gif new file mode 100644 index 0000000..89557d3 Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国际/guoji_11.gif differ diff --git a/documents/5.5寸首页新样式/icons/国际/guoji_16.png b/documents/5.5寸首页新样式/icons/国际/guoji_16.png new file mode 100644 index 0000000..8045959 Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国际/guoji_16.png differ diff --git a/documents/5.5寸首页新样式/icons/国际/guoji_17.gif b/documents/5.5寸首页新样式/icons/国际/guoji_17.gif new file mode 100644 index 0000000..8b32cf0 Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国际/guoji_17.gif differ diff --git a/documents/5.5寸首页新样式/icons/国际/guoji_19.gif b/documents/5.5寸首页新样式/icons/国际/guoji_19.gif new file mode 100644 index 0000000..0ecfdb5 Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国际/guoji_19.gif differ diff --git a/documents/5.5寸首页新样式/icons/国际/guoji_24.gif b/documents/5.5寸首页新样式/icons/国际/guoji_24.gif new file mode 100644 index 0000000..4ce87ec Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国际/guoji_24.gif differ diff --git a/documents/5.5寸首页新样式/icons/国际/guoji_26.gif b/documents/5.5寸首页新样式/icons/国际/guoji_26.gif new file mode 100644 index 0000000..be5d2c5 Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国际/guoji_26.gif differ diff --git a/documents/5.5寸首页新样式/icons/国际/guoji_28.gif b/documents/5.5寸首页新样式/icons/国际/guoji_28.gif new file mode 100644 index 0000000..3c04c88 Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国际/guoji_28.gif differ diff --git a/documents/5.5寸首页新样式/icons/国际/guoji_33.gif b/documents/5.5寸首页新样式/icons/国际/guoji_33.gif new file mode 100644 index 0000000..cf5cbf1 Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国际/guoji_33.gif differ diff --git a/documents/5.5寸首页新样式/icons/国际/guoji_35.gif b/documents/5.5寸首页新样式/icons/国际/guoji_35.gif new file mode 100644 index 0000000..89e954d Binary files /dev/null and b/documents/5.5寸首页新样式/icons/国际/guoji_35.gif differ diff --git a/module_p/src/main/java/com/sixin/module_p/ui/enter/PDAEnterActivity.kt b/module_p/src/main/java/com/sixin/module_p/ui/enter/PDAEnterActivity.kt index 051b1ad..1cbd112 100644 --- a/module_p/src/main/java/com/sixin/module_p/ui/enter/PDAEnterActivity.kt +++ b/module_p/src/main/java/com/sixin/module_p/ui/enter/PDAEnterActivity.kt @@ -2,9 +2,11 @@ package com.sixin.module_p.ui.enter import android.content.Context.RECEIVER_EXPORTED import android.content.IntentFilter +import android.graphics.Typeface import android.os.Build import android.os.Bundle import android.view.View +import androidx.core.content.ContextCompat import com.alibaba.android.arouter.facade.annotation.Route import com.lukouguoji.module_base.base.CustomVP2Adapter import com.lukouguoji.module_base.bean.SocketEventBean @@ -41,6 +43,9 @@ class PDAEnterActivity : BasePdaActivity(ConstantEvent.LOGOUT) @@ -93,6 +99,17 @@ class PDAEnterActivity : BasePdaActivity + tv.typeface = if (i == index) Typeface.create("sans-serif-medium", Typeface.NORMAL) + else Typeface.DEFAULT + } + } + override fun onDestroy() { super.onDestroy() unregisterReceiver(receiver) @@ -101,6 +118,7 @@ class PDAEnterActivity : BasePdaActivity +) + +/** + * 按登录返回的 authList 过滤,**判定方式与改版前逐字一致**(`authList.contains(key)`), + * 保证改版前后同一账号看到的入口集合不变;过滤后为空的分组整组不显示 + */ +fun List.filterByAuth(): List = + map { group -> + group.copy(items = group.items.filter { + SharedPreferenceUtil.getString(Constant.Share.authList).contains(it.key) + }) + }.filter { it.items.isNotEmpty() } + +/** + * 把分组菜单渲染成设计稿的「分组标题栏 + 三列宫格」 + * + * 入口数量是固定的小清单,直接按行铺 LinearLayout,比 RecyclerView 多类型 + 网格装饰简单, + * 也能精确还原设计稿的行距与内边距 + */ +object PdaMenuRenderer { + + private const val SPAN_COUNT = 3 + + /** 宫格行距(设计稿 row-gap 12px) */ + private const val ROW_GAP_DP = 12f + + /** 最后一组宫格底部内边距(设计稿 padding-bottom: clamp(16px, 5.6vw, 22px)) */ + private const val LAST_GRID_PADDING_BOTTOM_DP = 22f + + fun render( + container: LinearLayout, + groups: List, + onItemClick: (ActionBean) -> Unit + ) { + container.removeAllViews() + val inflater = LayoutInflater.from(container.context) + + groups.forEachIndexed { groupIndex, group -> + val groupBinding = ItemPdaMenuGroupBinding.inflate(inflater, container, true) + groupBinding.title = group.title + groupBinding.executePendingBindings() + + val grid = groupBinding.llGrid + if (groupIndex == groups.lastIndex) { + grid.setPadding( + grid.paddingLeft, + grid.paddingTop, + grid.paddingRight, + grid.dp(LAST_GRID_PADDING_BOTTOM_DP) + ) + } + + group.items.chunked(SPAN_COUNT).forEachIndexed { rowIndex, rowItems -> + val row = LinearLayout(container.context).apply { + orientation = LinearLayout.HORIZONTAL + } + grid.addView( + row, + LinearLayout.LayoutParams( + LinearLayout.LayoutParams.MATCH_PARENT, + LinearLayout.LayoutParams.WRAP_CONTENT + ).apply { + if (rowIndex > 0) topMargin = grid.dp(ROW_GAP_DP) + } + ) + + rowItems.forEach { bean -> + val cell = ItemPdaActionBinding.inflate(inflater, row, false) + cell.bean = bean + cell.ivIcon.setImageResource(bean.icon) + // 圆角裁剪:XML 的 android:clipToOutline 仅 API 31+ 生效,需代码设置 + cell.ivIcon.clipToOutline = true + cell.executePendingBindings() + cell.ll.setOnClickListener { onItemClick(bean) } + row.addView(cell.root, cellParams()) + } + // 末行不足三个时补位,保证列宽一致 + repeat(SPAN_COUNT - rowItems.size) { + row.addView(Space(container.context), cellParams()) + } + } + } + } + + private fun cellParams() = + LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f) + + /** 用 View 自身 resources 换算(已被 AutoSize 改写为当前页面基准) */ + private fun View.dp(value: Float) = (value * resources.displayMetrics.density + 0.5f).toInt() +} diff --git a/module_p/src/main/java/com/sixin/module_p/ui/enter/gj/GjFragment.kt b/module_p/src/main/java/com/sixin/module_p/ui/enter/gj/GjFragment.kt index 991ed65..e16f59d 100644 --- a/module_p/src/main/java/com/sixin/module_p/ui/enter/gj/GjFragment.kt +++ b/module_p/src/main/java/com/sixin/module_p/ui/enter/gj/GjFragment.kt @@ -2,13 +2,9 @@ package com.sixin.module_p.ui.enter.gj import androidx.fragment.app.Fragment import com.lukouguoji.module_base.base.BaseBindingFragment -import com.lukouguoji.module_base.base.CommonAdapter -import com.lukouguoji.module_base.interfaces.IOnItemClickListener -import com.lukouguoji.module_base.ktx.addOnItemClickListener -import com.lukouguoji.module_base.ktx.loge -import com.lukouguoji.module_base.ktx.refresh import com.sixin.module_p.R import com.sixin.module_p.databinding.FragmentGjBinding +import com.sixin.module_p.ui.enter.PdaMenuRenderer class GjFragment : BaseBindingFragment() { override fun layoutId(): Int { @@ -22,16 +18,9 @@ class GjFragment : BaseBindingFragment() { override fun initOnViewCreated() { binding.viewModel = viewModel - binding.rv.adapter = - CommonAdapter(requireContext(), R.layout.item_pda_action, GjViewHolder::class.java) - - binding.rv.addOnItemClickListener(object : IOnItemClickListener { - override fun onItemClick(position: Int, type: Int) { - viewModel.onItemClick(position) - } - }) - - binding.rv.refresh(viewModel.actionList) + PdaMenuRenderer.render(binding.llMenu, viewModel.groups) { + viewModel.onItemClick(it) + } } companion object { diff --git a/module_p/src/main/java/com/sixin/module_p/ui/enter/gj/GjViewHolder.kt b/module_p/src/main/java/com/sixin/module_p/ui/enter/gj/GjViewHolder.kt deleted file mode 100644 index 4e3d4f3..0000000 --- a/module_p/src/main/java/com/sixin/module_p/ui/enter/gj/GjViewHolder.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.sixin.module_p.ui.enter.gj - -import android.view.View -import com.lukouguoji.module_base.base.BaseViewHolder -import com.lukouguoji.module_base.bean.ActionBean -import com.sixin.module_p.databinding.ItemPdaActionBinding - -class GjViewHolder(view: View) : BaseViewHolder(view) { - override fun onBind(item: Any?, position: Int) { - binding.bean = getItemBean(item) - notifyItemClick(position, binding.ll) - } -} \ No newline at end of file diff --git a/module_p/src/main/java/com/sixin/module_p/ui/enter/gj/GjViewModel.kt b/module_p/src/main/java/com/sixin/module_p/ui/enter/gj/GjViewModel.kt index 45b2972..cecd552 100644 --- a/module_p/src/main/java/com/sixin/module_p/ui/enter/gj/GjViewModel.kt +++ b/module_p/src/main/java/com/sixin/module_p/ui/enter/gj/GjViewModel.kt @@ -4,10 +4,11 @@ import com.alibaba.android.arouter.launcher.ARouter import com.lukouguoji.module_base.base.BaseViewModel import com.lukouguoji.module_base.bean.ActionBean import com.lukouguoji.module_base.common.Constant -import com.lukouguoji.module_base.db.perference.SharedPreferenceUtil import com.lukouguoji.module_base.ktx.loge import com.lukouguoji.module_base.router.ARouterConstants import com.sixin.module_p.R +import com.sixin.module_p.ui.enter.PdaMenuGroup +import com.sixin.module_p.ui.enter.filterByAuth import com.sixin.module_p.ui.guobang.PdaGuoBangActivity import com.sixin.module_p.ui.lihuo.PdaLiHuoActivity import com.sixin.module_p.ui.shouyun.PdaShouYunActivity @@ -21,87 +22,97 @@ import dev.DevUtils * 某项没配 [ActionBean.key] 对应的权限串时不显示。所以新页面适配完之后 * **必须回来这里加一行**,否则手机端首页根本没有入口。 * + * 分组与组内顺序按 documents/5.5寸首页新样式/home.html 设计稿;设计稿没画的入口追加到 + * 所属分组末尾并沿用旧图标。入口集合、权限串、跳转与改版前完全一致(过滤见 [filterByAuth])。 + * * 两类跳转: * - 带 [ActionBean.route] → 通用 ARouter 跳转(module_p 不依赖 module_gjc 等业务模块, * 跨模块只能走路由)。**5.5 寸适配页一律用这种,加一行即可。** - * - 不带 route → 落到 [onItemClick] 的 when 分支(module_p 内部的 PDA 专用页面) + * - 不带 route → 落到 [onItemClick] 的 when 分支(module_p 内的 PDA 专用页面) */ class GjViewModel : BaseViewModel() { - val actionList = listOf( - // ===== module_p 内的 PDA 专用页面(无 route,走 when 分支) ===== - ActionBean("普货收运", R.drawable.gjc_shou_yun_icon, Constant.AuthName.GjcAppDomExpCheckin), - ActionBean("板箱组装", R.drawable.img_bxzz, Constant.AuthName.GjcBanXListActivity), - ActionBean("板箱过磅", R.drawable.gjc_fu_bang_icon, Constant.AuthName.GjcFuBangActivity), - ActionBean("进港理货", R.drawable.img_jglh, Constant.AuthName.GjjTallyListActivity), - - // ===== 5.5 寸手机版已适配页面(图标复用 Pad 端同款,跳转走 ARouter) ===== - ActionBean( - "出港移库", - R.drawable.gjc_yi_ku_icon, - Constant.AuthName.GjcYiKuListActivity, - ARouterConstants.ACTIVITY_URL_INT_EXP_MOVE - ), - ActionBean( - "出库交接", - R.drawable.img_gjc_chuku_jiaojie, - Constant.AuthName.GjcIntExpOutHandover, - ARouterConstants.ACTIVITY_URL_INT_EXP_OUT_HANDOVER - ), - ActionBean( - "出港计重", - R.drawable.img_gjc_chugangjizhong, - Constant.AuthName.GjcCheckWeighing, - ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_LIST - ), - ActionBean( - "出港运抵", - R.drawable.img_gjc_chugang_diyun, - Constant.AuthName.GjcIntExpArrive, - ARouterConstants.ACTIVITY_URL_INT_EXP_ARRIVE - ), - ActionBean( - "出港查询", - R.drawable.gjc_query_icon, - Constant.AuthName.GjcQueryListActivity, - ARouterConstants.ACTIVITY_URL_GJC_QUERY_LIST - ), - ActionBean( - "出港仓库", - R.drawable.gjc_cang_ku_icon, - Constant.AuthName.GjcIntExpStorageUse, - ARouterConstants.ACTIVITY_URL_INT_EXP_STORAGE_USE - ), - ActionBean( - "进港仓库", - R.drawable.gjc_cang_ku_icon, // Pad 端进港仓库菜单同样复用出港仓库图标 - Constant.AuthName.GjjWareHouseActivity, - ARouterConstants.ACTIVITY_URL_GJJ_WARE_HOUSE - ), - ActionBean( - "进港查询", - R.drawable.gjj_query_icon, - Constant.AuthName.GjjQueryListActivity, - ARouterConstants.ACTIVITY_URL_GJJ_QUERY_LIST - ), - ActionBean( - "提取出库", - R.drawable.gjj_chu_ku_icon, - Constant.AuthName.IntImpPickUpDLV, - ARouterConstants.ACTIVITY_URL_INT_IMP_PICK_UP_DLV - ), - // ULD管理属综合管理业务(Pad 端在「综合管理」菜单组),手机端首页暂无综合 Tab,挂在国际 Tab 下 - ActionBean( - "ULD管理", - com.lukouguoji.module_base.R.mipmap.cargo, // 图标复用 Pad 端同款(在 module_base,直接引用) - Constant.AuthName.ComprehensiveUld, // 权限串与 Pad 端菜单一致 - ARouterConstants.ACTIVITY_URL_ULD_LIST - ), - ).filter { SharedPreferenceUtil.getString(Constant.Share.authList).contains(it.key) } - - fun onItemClick(position: Int) { - val bean = actionList.getOrNull(position) ?: return + val groups = listOf( + PdaMenuGroup( + "国际出港", listOf( + ActionBean( + "出港计重", + R.drawable.img_pda_menu_gjc_weighing, + Constant.AuthName.GjcCheckWeighing, + ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_LIST + ), + ActionBean( + "出港运抵", + R.drawable.img_pda_menu_gjc_arrive, + Constant.AuthName.GjcIntExpArrive, + ARouterConstants.ACTIVITY_URL_INT_EXP_ARRIVE + ), + ActionBean( + "出库交接", + R.drawable.img_pda_menu_gjc_out_handover, + Constant.AuthName.GjcIntExpOutHandover, + ARouterConstants.ACTIVITY_URL_INT_EXP_OUT_HANDOVER + ), + ActionBean( + "出港移库", + R.drawable.img_pda_menu_gjc_move, + Constant.AuthName.GjcYiKuListActivity, + ARouterConstants.ACTIVITY_URL_INT_EXP_MOVE + ), + ActionBean( + "出港仓库", + R.drawable.img_pda_menu_gjc_storage, + Constant.AuthName.GjcIntExpStorageUse, + ARouterConstants.ACTIVITY_URL_INT_EXP_STORAGE_USE + ), + ActionBean( + "出港查询", + R.drawable.img_pda_menu_gjc_query, + Constant.AuthName.GjcQueryListActivity, + ARouterConstants.ACTIVITY_URL_GJC_QUERY_LIST + ), + // ===== 设计稿未覆盖:module_p 内的 PDA 专用页面(无 route,走 when 分支),沿用旧图标 ===== + ActionBean("普货收运", R.drawable.gjc_shou_yun_icon, Constant.AuthName.GjcAppDomExpCheckin), + ActionBean("板箱组装", R.drawable.img_bxzz, Constant.AuthName.GjcBanXListActivity), + ActionBean("板箱过磅", R.drawable.gjc_fu_bang_icon, Constant.AuthName.GjcFuBangActivity), + ) + ), + PdaMenuGroup( + "国际进港", listOf( + ActionBean("进港理货", R.drawable.img_pda_menu_gjj_tally, Constant.AuthName.GjjTallyListActivity), + ActionBean( + "提取出库", + R.drawable.img_pda_menu_gjj_pick_up, + Constant.AuthName.IntImpPickUpDLV, + ARouterConstants.ACTIVITY_URL_INT_IMP_PICK_UP_DLV + ), + ActionBean( + "进港仓库", + R.drawable.img_pda_menu_gjj_storage, + Constant.AuthName.GjjWareHouseActivity, + ARouterConstants.ACTIVITY_URL_GJJ_WARE_HOUSE + ), + ActionBean( + "进港查询", + R.drawable.img_pda_menu_gjj_query, + Constant.AuthName.GjjQueryListActivity, + ARouterConstants.ACTIVITY_URL_GJJ_QUERY_LIST + ), + ) + ), + PdaMenuGroup( + "综合管理", listOf( + ActionBean( + "ULD管理", + R.drawable.img_pda_menu_uld, + Constant.AuthName.ComprehensiveUld, // 权限串与 Pad 端菜单一致 + ARouterConstants.ACTIVITY_URL_ULD_LIST + ), + ) + ), + ).filterByAuth() + fun onItemClick(bean: ActionBean) { // 配了路由的直接跳(5.5 寸适配页走这条) if (bean.route.isNotEmpty()) { ARouter.getInstance().build(bean.route).navigation() diff --git a/module_p/src/main/java/com/sixin/module_p/ui/enter/gn/GnFragment.kt b/module_p/src/main/java/com/sixin/module_p/ui/enter/gn/GnFragment.kt index a701dfc..52fb62b 100644 --- a/module_p/src/main/java/com/sixin/module_p/ui/enter/gn/GnFragment.kt +++ b/module_p/src/main/java/com/sixin/module_p/ui/enter/gn/GnFragment.kt @@ -2,14 +2,9 @@ package com.sixin.module_p.ui.enter.gn import androidx.fragment.app.Fragment import com.lukouguoji.module_base.base.BaseBindingFragment -import com.lukouguoji.module_base.base.CommonAdapter -import com.lukouguoji.module_base.interfaces.IOnItemClickListener -import com.lukouguoji.module_base.ktx.addOnItemClickListener -import com.lukouguoji.module_base.ktx.loge -import com.lukouguoji.module_base.ktx.refresh import com.sixin.module_p.R import com.sixin.module_p.databinding.FragmentGnBinding -import com.sixin.module_p.ui.enter.gj.GjViewHolder +import com.sixin.module_p.ui.enter.PdaMenuRenderer class GnFragment : BaseBindingFragment() { override fun layoutId(): Int { @@ -23,16 +18,9 @@ class GnFragment : BaseBindingFragment() { override fun initOnViewCreated() { binding.viewModel = viewModel - binding.rv.adapter = - CommonAdapter(requireContext(), R.layout.item_pda_action, GjViewHolder::class.java) - - binding.rv.addOnItemClickListener(object : IOnItemClickListener { - override fun onItemClick(position: Int, type: Int) { - viewModel.onItemClick(position) - } - }) - - binding.rv.refresh(viewModel.actionList) + PdaMenuRenderer.render(binding.llMenu, viewModel.groups) { + viewModel.onItemClick(it) + } } companion object { diff --git a/module_p/src/main/java/com/sixin/module_p/ui/enter/gn/GnViewModel.kt b/module_p/src/main/java/com/sixin/module_p/ui/enter/gn/GnViewModel.kt index 907c894..667a73d 100644 --- a/module_p/src/main/java/com/sixin/module_p/ui/enter/gn/GnViewModel.kt +++ b/module_p/src/main/java/com/sixin/module_p/ui/enter/gn/GnViewModel.kt @@ -5,11 +5,12 @@ import com.alibaba.android.arouter.launcher.ARouter import com.lukouguoji.module_base.base.BaseViewModel import com.lukouguoji.module_base.bean.ActionBean import com.lukouguoji.module_base.common.Constant -import com.lukouguoji.module_base.db.perference.SharedPreferenceUtil import com.lukouguoji.module_base.ktx.logd import com.lukouguoji.module_base.ktx.loge import com.lukouguoji.module_base.router.ARouterConstants import com.sixin.module_p.R +import com.sixin.module_p.ui.enter.PdaMenuGroup +import com.sixin.module_p.ui.enter.filterByAuth import com.sixin.module_p.ui.enter.gn.document.PdaDocumentHandoverActivity import com.sixin.module_p.ui.gnc.cunfang.list.PdaGncCunFangListActivity import com.sixin.module_p.ui.gnc.fubang.add.PdaGncFuBangAddActivity @@ -20,65 +21,53 @@ import com.sixin.module_p.ui.goods.transport.list.PdaGoodsTransportListActivity import com.sixin.module_p.ui.goods.transportLog.list.PdaTransportLogActivity import dev.DevUtils +/** + * 手持端首页「国内业务」Tab + * + * 菜单是手写清单 + authList 权限过滤(同 [com.sixin.module_p.ui.enter.gj.GjViewModel])。 + * 分组与组内顺序按 documents/5.5寸首页新样式/domestic.html 设计稿;入口集合、权限串、 + * 跳转与改版前完全一致(过滤见 [filterByAuth])。 + */ class GnViewModel : BaseViewModel() { - val actionList = listOf( - ActionBean( - "出港收运", - com.lukouguoji.module_base.R.drawable.img_gnc_shouyun, - Constant.AuthName.AppDomExpCheckin + val groups = listOf( + PdaMenuGroup( + "国内出港", listOf( + ActionBean("出港收运", R.drawable.img_pda_menu_gnc_shou_yun, Constant.AuthName.AppDomExpCheckin), + ActionBean("出港复磅", R.drawable.img_pda_menu_gnc_fu_bang, Constant.AuthName.AppDomExpWeighting), + ActionBean("出港存放", R.drawable.img_pda_menu_gnc_cun_fang, Constant.AuthName.AppDomExpDeposit), + ActionBean("单证交接", R.drawable.img_pda_menu_document_handover, Constant.AuthName.DocumentHandover), + ActionBean("货物转运", R.drawable.img_pda_menu_goods_transport, Constant.AuthName.ComprehensiveTransfer), + ActionBean("转运记录", R.drawable.img_pda_menu_transport_log, Constant.AuthName.TransportLog), + ) ), - ActionBean("出港复磅", R.drawable.gnc_fubang, Constant.AuthName.AppDomExpWeighting), - ActionBean( - "出港存放", - com.lukouguoji.module_base.R.drawable.img_gnc_cunfang, - Constant.AuthName.AppDomExpDeposit + PdaMenuGroup( + "国内进港", listOf( + ActionBean("进港卸机", R.drawable.img_pda_menu_gnj_xie_ji, Constant.AuthName.MonitorInPack), + ActionBean( + "进港移库", + R.drawable.img_pda_menu_gnj_move, + Constant.AuthName.GnjYiKu, // 权限串与 Pad 端菜单一致(AppDomImpMove) + ARouterConstants.ACTIVITY_URL_GNJ_MOVE_STASH_LIST // 与 Pad 首页菜单同一跳转页(app 模块,走路由) + ), + ) ), - ActionBean( - "进港卸机", - com.lukouguoji.module_base.R.drawable.img_gnc_xieji, - Constant.AuthName.MonitorInPack + PdaMenuGroup( + "综合管理", listOf( + ActionBean("事故签证", R.drawable.img_pda_menu_accident_visa, Constant.AuthName.ComprehensiveAccidentVisa), + ) ), - ActionBean( - "货物转运", - com.lukouguoji.module_base.R.drawable.img_gnc_huowuzhuanyun, - Constant.AuthName.ComprehensiveTransfer - ), - ActionBean( - "转运记录", - com.lukouguoji.module_base.R.mipmap.transport_log, - Constant.AuthName.TransportLog - ), - ActionBean( - "事故签证", - R.mipmap.mit_accident_visa, - Constant.AuthName.ComprehensiveAccidentVisa - ), - ActionBean( - "单证交接", - R.mipmap.gnc_document_handover, - Constant.AuthName.DocumentHandover - ), - ActionBean( - "进港移库", - R.drawable.gnj_yi_ku_icon, // 图标复制自 module_gnj(module_p 看不到业务模块资源) - Constant.AuthName.GnjYiKu, // 权限串与 Pad 端菜单一致(AppDomImpMove) - ARouterConstants.ACTIVITY_URL_GNJ_MOVE_STASH_LIST // 与 Pad 首页菜单同一跳转页(app 模块,走路由) - ), - ) - .filter { SharedPreferenceUtil.getString(Constant.Share.authList).contains(it.key) } + ).filterByAuth() - fun onItemClick(position: Int) { - val bean = actionList.getOrNull(position) ?: return - + fun onItemClick(bean: ActionBean) { // 配了路由的直接跳(5.5 寸适配页走这条,与 GjViewModel 同模式) if (bean.route.isNotEmpty()) { ARouter.getInstance().build(bean.route).navigation() return } - when (val title = actionList[position].title) { + when (val title = bean.title) { "出港收运" -> { GncUnShouYunActivity.start(DevUtils.getTopActivity()) } diff --git a/module_p/src/main/java/com/sixin/module_p/ui/enter/home/HomeFragment.kt b/module_p/src/main/java/com/sixin/module_p/ui/enter/home/HomeFragment.kt index d8e7e20..ca60fb5 100644 --- a/module_p/src/main/java/com/sixin/module_p/ui/enter/home/HomeFragment.kt +++ b/module_p/src/main/java/com/sixin/module_p/ui/enter/home/HomeFragment.kt @@ -1,8 +1,8 @@ package com.sixin.module_p.ui.enter.home -import android.widget.LinearLayout +import android.graphics.Typeface +import android.widget.TextView import androidx.fragment.app.Fragment -import androidx.recyclerview.widget.LinearLayoutManager import com.lukouguoji.module_base.base.BaseBindingFragment import com.lukouguoji.module_base.base.CommonAdapter import com.sixin.module_p.R @@ -25,9 +25,24 @@ class HomeFragment : BaseBindingFragment( CommonAdapter(requireContext(), R.layout.item_pda_home, HomeViewHolder::class.java) viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this) + // 分段按钮选中态加粗(设计稿 font-weight 500,选择器表达不了字重) + viewModel.countryType.observe(viewLifecycleOwner) { + setMedium(binding.tvScopeGn, it != true) + setMedium(binding.tvScopeGj, it == true) + } + viewModel.type.observe(viewLifecycleOwner) { + setMedium(binding.tvDirArrival, it == HomeViewModel.TYPE_ARRIVAL) + setMedium(binding.tvDirLeave, it == HomeViewModel.TYPE_LEAVE) + } + viewModel.refresh() } + private fun setMedium(tv: TextView, medium: Boolean) { + tv.typeface = if (medium) Typeface.create("sans-serif-medium", Typeface.NORMAL) + else Typeface.DEFAULT + } + companion object { fun newInstance(): Fragment { return HomeFragment() diff --git a/module_p/src/main/java/com/sixin/module_p/ui/enter/home/HomeViewHolder.kt b/module_p/src/main/java/com/sixin/module_p/ui/enter/home/HomeViewHolder.kt index 293ec76..538fce0 100644 --- a/module_p/src/main/java/com/sixin/module_p/ui/enter/home/HomeViewHolder.kt +++ b/module_p/src/main/java/com/sixin/module_p/ui/enter/home/HomeViewHolder.kt @@ -1,6 +1,5 @@ package com.sixin.module_p.ui.enter.home -import android.graphics.Color import android.view.View import com.lukouguoji.module_base.base.BaseViewHolder import com.lukouguoji.module_base.bean.FlightBean @@ -10,12 +9,6 @@ class HomeViewHolder(view: View) : BaseViewHolder - date.value = "${year}-${month + 1}-${dayOfMonth}" + date.value = formatDate(Calendar.getInstance().apply { set(year, month, dayOfMonth) }) refresh() } } @@ -69,10 +75,35 @@ class HomeViewModel : BasePageViewModel() { configModel.show() } + /** + * 国内 / 国际 切换(countryType 的 observer 负责刷新) + */ + fun onCountryTypeChange(isGj: Boolean) { + if (countryType.value != isGj) countryType.value = isGj + } + + /** + * 日期前后翻一天(设计稿日期两侧的 ‹ ›) + */ + fun onDateStep(offset: Int) { + date.value = formatDate(parseDate(date.value).apply { add(Calendar.DAY_OF_MONTH, offset) }) + refresh() + } + + private fun parseDate(value: String?): Calendar = + DateUtils.getCalendar(DateUtils.parseDate(value, "yyyy-MM-dd") ?: java.util.Date()) + + private fun formatDate(calendar: Calendar): String = + DateUtils.formatDate(calendar.time, "yyyy-MM-dd") + /** * 日期点击 */ fun onDateClick() { + // 从当前选中日期打开(‹ › 翻日后不再是今天) + parseDate(date.value).let { + datePicker.updateDate(it.get(Calendar.YEAR), it.get(Calendar.MONTH), it.get(Calendar.DAY_OF_MONTH)) + } datePicker.show() } diff --git a/module_p/src/main/res/color/phone_home_segment_text.xml b/module_p/src/main/res/color/phone_home_segment_text.xml new file mode 100644 index 0000000..92cf675 --- /dev/null +++ b/module_p/src/main/res/color/phone_home_segment_text.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/module_p/src/main/res/color/phone_home_tab_tint.xml b/module_p/src/main/res/color/phone_home_tab_tint.xml new file mode 100644 index 0000000..c931019 --- /dev/null +++ b/module_p/src/main/res/color/phone_home_tab_tint.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_accident_visa.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_accident_visa.png new file mode 100644 index 0000000..5397a09 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_accident_visa.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_document_handover.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_document_handover.png new file mode 100644 index 0000000..39ca609 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_document_handover.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_arrive.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_arrive.png new file mode 100644 index 0000000..5042bdb Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_arrive.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_move.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_move.png new file mode 100644 index 0000000..dff38d2 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_move.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_out_handover.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_out_handover.png new file mode 100644 index 0000000..a11812e Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_out_handover.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_query.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_query.png new file mode 100644 index 0000000..3f43941 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_query.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_storage.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_storage.png new file mode 100644 index 0000000..46b4e91 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_storage.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_weighing.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_weighing.png new file mode 100644 index 0000000..2dec5cb Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjc_weighing.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjj_pick_up.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjj_pick_up.png new file mode 100644 index 0000000..cca1db2 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjj_pick_up.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjj_query.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjj_query.png new file mode 100644 index 0000000..04e6ea8 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjj_query.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjj_storage.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjj_storage.png new file mode 100644 index 0000000..bd69b71 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjj_storage.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjj_tally.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjj_tally.png new file mode 100644 index 0000000..779ccb9 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gjj_tally.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_gnc_cun_fang.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gnc_cun_fang.png new file mode 100644 index 0000000..f8c38b8 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gnc_cun_fang.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_gnc_fu_bang.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gnc_fu_bang.png new file mode 100644 index 0000000..9916c99 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gnc_fu_bang.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_gnc_shou_yun.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gnc_shou_yun.png new file mode 100644 index 0000000..c0d95ce Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gnc_shou_yun.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_gnj_move.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gnj_move.png new file mode 100644 index 0000000..9406cc0 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gnj_move.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_gnj_xie_ji.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gnj_xie_ji.png new file mode 100644 index 0000000..602bf1c Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_gnj_xie_ji.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_goods_transport.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_goods_transport.png new file mode 100644 index 0000000..d6593e3 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_goods_transport.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_group_arrow.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_group_arrow.png new file mode 100644 index 0000000..8eb18a3 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_group_arrow.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_transport_log.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_transport_log.png new file mode 100644 index 0000000..e4b3a80 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_transport_log.png differ diff --git a/module_p/src/main/res/drawable-nodpi/img_pda_menu_uld.png b/module_p/src/main/res/drawable-nodpi/img_pda_menu_uld.png new file mode 100644 index 0000000..5844aa9 Binary files /dev/null and b/module_p/src/main/res/drawable-nodpi/img_pda_menu_uld.png differ diff --git a/module_p/src/main/res/drawable-xxhdpi/gjc_cang_ku_icon.png b/module_p/src/main/res/drawable-xxhdpi/gjc_cang_ku_icon.png deleted file mode 100644 index 6dceea0..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/gjc_cang_ku_icon.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/gjc_query_icon.png b/module_p/src/main/res/drawable-xxhdpi/gjc_query_icon.png deleted file mode 100644 index 76433e2..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/gjc_query_icon.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/gjc_yi_ku_icon.png b/module_p/src/main/res/drawable-xxhdpi/gjc_yi_ku_icon.png deleted file mode 100644 index 8962030..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/gjc_yi_ku_icon.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/gjj_chu_ku_icon.png b/module_p/src/main/res/drawable-xxhdpi/gjj_chu_ku_icon.png deleted file mode 100644 index 7cca5d2..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/gjj_chu_ku_icon.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/gjj_query_icon.png b/module_p/src/main/res/drawable-xxhdpi/gjj_query_icon.png deleted file mode 100644 index 0e98155..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/gjj_query_icon.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/gnc_fubang.png b/module_p/src/main/res/drawable-xxhdpi/gnc_fubang.png deleted file mode 100644 index 10416e3..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/gnc_fubang.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/gnj_yi_ku_icon.png b/module_p/src/main/res/drawable-xxhdpi/gnj_yi_ku_icon.png deleted file mode 100644 index 26454c6..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/gnj_yi_ku_icon.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/img_gjc_chugang_diyun.png b/module_p/src/main/res/drawable-xxhdpi/img_gjc_chugang_diyun.png deleted file mode 100644 index 430eb62..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/img_gjc_chugang_diyun.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/img_gjc_chugangjizhong.png b/module_p/src/main/res/drawable-xxhdpi/img_gjc_chugangjizhong.png deleted file mode 100644 index 57ab8e4..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/img_gjc_chugangjizhong.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/img_gjc_chuku_jiaojie.png b/module_p/src/main/res/drawable-xxhdpi/img_gjc_chuku_jiaojie.png deleted file mode 100644 index 20d20c8..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/img_gjc_chuku_jiaojie.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/img_jglh.png b/module_p/src/main/res/drawable-xxhdpi/img_jglh.png deleted file mode 100644 index 63fad4c..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/img_jglh.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_1_n.png b/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_1_n.png deleted file mode 100644 index f3eac64..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_1_n.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_1_s.png b/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_1_s.png deleted file mode 100644 index 20573bc..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_1_s.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_2_n.png b/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_2_n.png deleted file mode 100644 index 2de3bd1..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_2_n.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_2_s.png b/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_2_s.png deleted file mode 100644 index 1160136..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_2_s.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_3_n.png b/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_3_n.png deleted file mode 100644 index 3a2ea49..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_3_n.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_3_s.png b/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_3_s.png deleted file mode 100644 index ac74e49..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_3_s.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_4_n.png b/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_4_n.png deleted file mode 100644 index 4c48480..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_4_n.png and /dev/null differ diff --git a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_4_s.png b/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_4_s.png deleted file mode 100644 index eaa711c..0000000 Binary files a/module_p/src/main/res/drawable-xxhdpi/img_pda_tab_4_s.png and /dev/null differ diff --git a/module_p/src/main/res/drawable/bg_phone_home_badge.xml b/module_p/src/main/res/drawable/bg_phone_home_badge.xml new file mode 100644 index 0000000..82f797b --- /dev/null +++ b/module_p/src/main/res/drawable/bg_phone_home_badge.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/module_p/src/main/res/drawable/bg_phone_home_card.xml b/module_p/src/main/res/drawable/bg_phone_home_card.xml new file mode 100644 index 0000000..b3f85d9 --- /dev/null +++ b/module_p/src/main/res/drawable/bg_phone_home_card.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/module_p/src/main/res/drawable/bg_phone_home_date.xml b/module_p/src/main/res/drawable/bg_phone_home_date.xml new file mode 100644 index 0000000..99cd7b2 --- /dev/null +++ b/module_p/src/main/res/drawable/bg_phone_home_date.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/module_p/src/main/res/drawable/bg_phone_home_fab.xml b/module_p/src/main/res/drawable/bg_phone_home_fab.xml new file mode 100644 index 0000000..2269f77 --- /dev/null +++ b/module_p/src/main/res/drawable/bg_phone_home_fab.xml @@ -0,0 +1,4 @@ + + + + diff --git a/module_p/src/main/res/drawable/bg_phone_home_segment_group.xml b/module_p/src/main/res/drawable/bg_phone_home_segment_group.xml new file mode 100644 index 0000000..e593f52 --- /dev/null +++ b/module_p/src/main/res/drawable/bg_phone_home_segment_group.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/module_p/src/main/res/drawable/bg_phone_home_segment_option.xml b/module_p/src/main/res/drawable/bg_phone_home_segment_option.xml new file mode 100644 index 0000000..a733fa2 --- /dev/null +++ b/module_p/src/main/res/drawable/bg_phone_home_segment_option.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/module_p/src/main/res/drawable/bg_phone_home_tab_bar.xml b/module_p/src/main/res/drawable/bg_phone_home_tab_bar.xml new file mode 100644 index 0000000..61a6461 --- /dev/null +++ b/module_p/src/main/res/drawable/bg_phone_home_tab_bar.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/module_p/src/main/res/drawable/bg_phone_home_tile.xml b/module_p/src/main/res/drawable/bg_phone_home_tile.xml new file mode 100644 index 0000000..63464b3 --- /dev/null +++ b/module_p/src/main/res/drawable/bg_phone_home_tile.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/module_p/src/main/res/drawable/ic_phone_home_bell.xml b/module_p/src/main/res/drawable/ic_phone_home_bell.xml new file mode 100644 index 0000000..4deb77d --- /dev/null +++ b/module_p/src/main/res/drawable/ic_phone_home_bell.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/module_p/src/main/res/drawable/ic_phone_home_chevron_left.xml b/module_p/src/main/res/drawable/ic_phone_home_chevron_left.xml new file mode 100644 index 0000000..970d5e0 --- /dev/null +++ b/module_p/src/main/res/drawable/ic_phone_home_chevron_left.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/module_p/src/main/res/drawable/ic_phone_home_chevron_right.xml b/module_p/src/main/res/drawable/ic_phone_home_chevron_right.xml new file mode 100644 index 0000000..e8154b0 --- /dev/null +++ b/module_p/src/main/res/drawable/ic_phone_home_chevron_right.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/module_p/src/main/res/drawable/ic_phone_home_settings.xml b/module_p/src/main/res/drawable/ic_phone_home_settings.xml new file mode 100644 index 0000000..a04169c --- /dev/null +++ b/module_p/src/main/res/drawable/ic_phone_home_settings.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/module_p/src/main/res/drawable/ic_phone_home_tab_earth.xml b/module_p/src/main/res/drawable/ic_phone_home_tab_earth.xml new file mode 100644 index 0000000..4516487 --- /dev/null +++ b/module_p/src/main/res/drawable/ic_phone_home_tab_earth.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/module_p/src/main/res/drawable/ic_phone_home_tab_home.xml b/module_p/src/main/res/drawable/ic_phone_home_tab_home.xml new file mode 100644 index 0000000..8d14a45 --- /dev/null +++ b/module_p/src/main/res/drawable/ic_phone_home_tab_home.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/module_p/src/main/res/drawable/ic_phone_home_tab_home_filled.xml b/module_p/src/main/res/drawable/ic_phone_home_tab_home_filled.xml new file mode 100644 index 0000000..4d1537e --- /dev/null +++ b/module_p/src/main/res/drawable/ic_phone_home_tab_home_filled.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/module_p/src/main/res/drawable/ic_phone_home_tab_home_outline.xml b/module_p/src/main/res/drawable/ic_phone_home_tab_home_outline.xml new file mode 100644 index 0000000..6c33679 --- /dev/null +++ b/module_p/src/main/res/drawable/ic_phone_home_tab_home_outline.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/module_p/src/main/res/drawable/ic_phone_home_tab_intl.xml b/module_p/src/main/res/drawable/ic_phone_home_tab_intl.xml new file mode 100644 index 0000000..c08fef4 --- /dev/null +++ b/module_p/src/main/res/drawable/ic_phone_home_tab_intl.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + diff --git a/module_p/src/main/res/drawable/ic_phone_home_tab_mine.xml b/module_p/src/main/res/drawable/ic_phone_home_tab_mine.xml new file mode 100644 index 0000000..3045c0a --- /dev/null +++ b/module_p/src/main/res/drawable/ic_phone_home_tab_mine.xml @@ -0,0 +1,11 @@ + + + + + diff --git a/module_p/src/main/res/layout/activity_pdaenter.xml b/module_p/src/main/res/layout/activity_pdaenter.xml index 59c5b98..bc65702 100644 --- a/module_p/src/main/res/layout/activity_pdaenter.xml +++ b/module_p/src/main/res/layout/activity_pdaenter.xml @@ -1,6 +1,11 @@ + @@ -13,60 +18,67 @@ - + android:layout_above="@id/ll_tab" /> - + + - + - + - - - - - + + android:background="@drawable/bg_phone_home_tab_bar" + android:paddingTop="1dp" + android:paddingBottom="4dp"> + android:orientation="vertical" + android:selected="@{viewModel.index == 0}"> + android:layout_width="16dp" + android:layout_height="16dp" + android:src="@drawable/ic_phone_home_tab_home" + android:tint="@color/phone_home_tab_tint" + tools:ignore="ContentDescription" /> + android:id="@+id/tv_tab_home" + style="@style/PhoneHomeTabLabel" + android:text="首页" /> @@ -97,20 +109,20 @@ android:layout_weight="1" android:gravity="center" android:onClick="@{()->viewModel.onIndexChanged(1)}" - android:orientation="vertical"> + android:orientation="vertical" + android:selected="@{viewModel.index == 1}"> + android:layout_width="16dp" + android:layout_height="16dp" + android:src="@drawable/ic_phone_home_tab_earth" + android:tint="@color/phone_home_tab_tint" + tools:ignore="ContentDescription" /> + android:id="@+id/tv_tab_gn" + style="@style/PhoneHomeTabLabel" + android:text="国内" /> + android:orientation="vertical" + android:selected="@{viewModel.index == 2}"> + android:layout_width="wrap_content" + android:layout_height="16dp" + android:src="@drawable/ic_phone_home_tab_intl" + android:tint="@color/phone_home_tab_tint" + tools:ignore="ContentDescription" /> + android:id="@+id/tv_tab_gj" + style="@style/PhoneHomeTabLabel" + android:text="国际" /> + android:orientation="vertical" + android:selected="@{viewModel.index == 3}"> + android:layout_width="16dp" + android:layout_height="16dp" + android:src="@drawable/ic_phone_home_tab_mine" + android:tint="@color/phone_home_tab_tint" + tools:ignore="ContentDescription" /> + android:id="@+id/tv_tab_mine" + style="@style/PhoneHomeTabLabel" + android:text="我的" /> - \ No newline at end of file + diff --git a/module_p/src/main/res/layout/fragment_gj.xml b/module_p/src/main/res/layout/fragment_gj.xml index 20fd985..86a484f 100644 --- a/module_p/src/main/res/layout/fragment_gj.xml +++ b/module_p/src/main/res/layout/fragment_gj.xml @@ -1,7 +1,6 @@ - + + @@ -13,31 +12,29 @@ - + - + + + + android:orientation="vertical" + android:paddingBottom="8dp" /> - - - + - \ No newline at end of file + diff --git a/module_p/src/main/res/layout/fragment_gn.xml b/module_p/src/main/res/layout/fragment_gn.xml index 06ea9cb..a9f433e 100644 --- a/module_p/src/main/res/layout/fragment_gn.xml +++ b/module_p/src/main/res/layout/fragment_gn.xml @@ -1,7 +1,6 @@ - + + @@ -13,31 +12,29 @@ - + - + + + + android:orientation="vertical" + android:paddingBottom="8dp" /> - - - + - \ No newline at end of file + diff --git a/module_p/src/main/res/layout/fragment_pda_home.xml b/module_p/src/main/res/layout/fragment_pda_home.xml index 27bcc84..e668f98 100644 --- a/module_p/src/main/res/layout/fragment_pda_home.xml +++ b/module_p/src/main/res/layout/fragment_pda_home.xml @@ -1,4 +1,8 @@ + @@ -13,224 +17,233 @@ - + + - - - - - - + android:layout_height="0dp" + android:layout_weight="1"> + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="8dp" + android:background="@drawable/bg_phone_home_card" + android:orientation="vertical" + android:padding="1dp" + app:layout_constrainedHeight="true" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0"> + + android:layout_height="47dp" + android:gravity="center_vertical" + android:paddingHorizontal="9dp"> - + android:background="@drawable/bg_phone_home_segment_group" + android:padding="3dp"> - + + + + + + - + android:background="@drawable/bg_phone_home_segment_group" + android:padding="3dp"> - + + + + + + + + + + android:layout_width="27dp" + android:layout_height="31dp" + android:layout_marginStart="3dp" + android:background="@drawable/bg_phone_home_date" + android:gravity="center" + android:onClick="@{() -> viewModel.onDateClick()}" + android:orientation="vertical"> - - + android:fontFamily="sans-serif-medium" + android:includeFontPadding="false" + android:letterSpacing="0.029" + android:text="@{viewModel.dateMonth}" + android:textColor="@color/phone_home_text_hint" + android:textSize="7sp" + tools:text="10月" /> + + + + android:background="@color/phone_home_divider" /> + + android:layout_height="32dp" + android:background="@color/phone_home_group_bg" + android:gravity="center_vertical" + android:paddingHorizontal="4dp"> - + - - - - - - - - - - - - - - + android:text="航程" /> + + + + - - - - - - - - - - - - - + android:layout_height="1dp" + android:background="@color/phone_home_divider" /> + android:layout_height="wrap_content" + android:minHeight="120dp"> - + + + + - \ No newline at end of file + diff --git a/module_p/src/main/res/layout/fragment_pda_mine.xml b/module_p/src/main/res/layout/fragment_pda_mine.xml index 7a0944a..bcea015 100644 --- a/module_p/src/main/res/layout/fragment_pda_mine.xml +++ b/module_p/src/main/res/layout/fragment_pda_mine.xml @@ -15,14 +15,15 @@ android:background="@color/backgroud_gray" android:orientation="vertical"> + + android:layout_height="46dp" + android:background="@color/phone_home_primary"> @@ -31,9 +32,11 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" + android:letterSpacing="0.019" android:text="我的" android:textColor="@color/white" - android:textSize="18sp" /> + android:textSize="16sp" + android:textStyle="bold" /> diff --git a/module_p/src/main/res/layout/item_pda_action.xml b/module_p/src/main/res/layout/item_pda_action.xml index cb44510..ff49a07 100644 --- a/module_p/src/main/res/layout/item_pda_action.xml +++ b/module_p/src/main/res/layout/item_pda_action.xml @@ -1,4 +1,8 @@ + @@ -13,26 +17,33 @@ android:id="@+id/ll" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="5dp" - android:background="@drawable/home_right_item_sel" - android:gravity="center" - android:orientation="vertical" - android:padding="5dp"> + android:gravity="center_horizontal" + android:orientation="vertical"> + android:id="@+id/iv_icon" + android:layout_width="59.7dp" + android:layout_height="59.7dp" + android:background="@drawable/bg_phone_home_tile" + android:elevation="3dp" + android:outlineAmbientShadowColor="@android:color/transparent" + android:outlineSpotShadowColor="#365063" + android:scaleType="centerCrop" + tools:ignore="ContentDescription,UnusedAttribute" + tools:src="@drawable/img_pda_menu_gjc_weighing" /> + android:textColor="@color/phone_home_text_label" + android:textSize="12sp" + tools:text="出港计重" /> - \ No newline at end of file + diff --git a/module_p/src/main/res/layout/item_pda_home.xml b/module_p/src/main/res/layout/item_pda_home.xml index 0b3cc38..58dc3d3 100644 --- a/module_p/src/main/res/layout/item_pda_home.xml +++ b/module_p/src/main/res/layout/item_pda_home.xml @@ -1,5 +1,7 @@ - + + @@ -12,39 +14,34 @@ android:id="@+id/ll" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="#8c8c8c" android:orientation="vertical"> + android:layout_height="32dp" + android:gravity="center_vertical" + android:paddingHorizontal="4dp"> + tools:text="MU2222" /> + tools:text="HFE-PEK" /> + tools:text="国内" /> + + android:textColor="@color/phone_home_text_title" + android:textSize="11.5sp" + tools:text="12:20" /> + android:textColor="@color/phone_home_badge" + android:textSize="9sp" /> + + - \ No newline at end of file + diff --git a/module_p/src/main/res/layout/item_pda_menu_group.xml b/module_p/src/main/res/layout/item_pda_menu_group.xml new file mode 100644 index 0000000..666d8fb --- /dev/null +++ b/module_p/src/main/res/layout/item_pda_menu_group.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/module_p/src/main/res/values/colors.xml b/module_p/src/main/res/values/colors.xml new file mode 100644 index 0000000..63e28e7 --- /dev/null +++ b/module_p/src/main/res/values/colors.xml @@ -0,0 +1,15 @@ + + + + #3B71E8 + #F5F7FA + #F4F6F9 + #EDF0F4 + #EEF1F5 + #16202A + #2D3640 + #6B7A8D + #98A4B3 + #E1192D + #E8EFFD + diff --git a/module_p/src/main/res/values/themes.xml b/module_p/src/main/res/values/themes.xml index 78c9344..11c5017 100644 --- a/module_p/src/main/res/values/themes.xml +++ b/module_p/src/main/res/values/themes.xml @@ -13,4 +13,55 @@ @null + + + + + + + + + + + + + + \ No newline at end of file