feat(phone): 5.5 寸手持端首页按新设计稿改版
按 documents/5.5寸首页新样式/ 设计稿还原 PDAEnterActivity 四个 Tab(仅 module_p,平板不经过该页): - 国内/国际 Tab:分组标题栏 + 三列宫格(PdaMenuGroup / PdaMenuRenderer),分组与顺序按设计稿; 20 个入口换新图标(源 GIF/PNG 转 PNG 放 drawable-nodpi,放 xxhdpi 会先缩后放发糊), 设计稿未覆盖的入口追加到组尾沿用旧图标 - 权限过滤 authList.contains(key) 与改版前逐字一致:ADMIN 账号入口集合改版前后 diff 为空 (国内 9、国际 12),21 个入口逐个点击跳转目标不变 - 首页航班动态:卡片 + 国内/国际、进港/出港分段 + 日期卡片(‹ › 翻日)+ 浅色表格 + 设置悬浮钮; 默认方向改为进港,日期统一补零,日期选择器从当前选中日期打开 - 底部 Tab 栏(16dp 图标与文字居中)、消息铃铛与角标(四个 Tab 统一位置、切换不再移动)、 状态栏 #3B71E8;「我的」顶栏同步新导航栏样式;首页 AutoSize 基准 400 → 390 - 删除 module_p 中不再引用的旧菜单/Tab 图标副本 - CLAUDE.md / phone-adapt skill 更新首页菜单入口说明,补图标发糊、分段控件描边与取整两个坑 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
手持端首页容器:四个 Tab 的 ViewPager2 + 右上角消息铃铛 + 底部 Tab 栏
|
||||
样式按 documents/5.5寸首页新样式/ 设计稿(小屏紧凑档:导航 46dp、Tab 栏 58dp)
|
||||
Tab 选中态通过 android:selected 下发到子 View,图标/文字颜色走 phone_home_tab_tint 选择器
|
||||
Tab 图标:16dp(与设计稿实际图形同大),与文字水平居中(设计稿 iconify 图标实际只有 16px 且偏在 24px 盒子左上角,按需求不照搬)
|
||||
-->
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
@@ -13,60 +18,67 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/backgroud_gray"
|
||||
android:background="@color/phone_home_bg"
|
||||
tools:context=".ui.enter.PDAEnterActivity">
|
||||
|
||||
<RelativeLayout
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/vp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="50dp">
|
||||
android:layout_above="@id/ll_tab" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/vp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<!--
|
||||
消息铃铛(四个 Tab 共用一处、位置固定):按设计稿 domestic.html / home.html 的 .nav-bell——
|
||||
34dp 按钮距右 12dp、垂直居中于 46dp 导航栏,16dp 图形距按钮左上 4.5dp;角标相对按钮 right:-2dp / top:0,
|
||||
所以容器比按钮宽 2dp、右边距 10dp。dashboard.html 的铃铛位置略有不同(右 8dp),按多数统一,不随 Tab 切换
|
||||
-->
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_message"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:onClick="@{() -> viewModel.onMessageClick()}">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:onClick="@{() -> viewModel.onMessageClick()}">
|
||||
<ImageView
|
||||
android:id="@+id/iv_message"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:paddingStart="4.5dp"
|
||||
android:paddingTop="4.5dp"
|
||||
android:paddingEnd="13.5dp"
|
||||
android:paddingBottom="13.5dp"
|
||||
android:src="@drawable/ic_phone_home_bell"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/img_message_svg" />
|
||||
<TextView
|
||||
android:id="@+id/tv_message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="top|end"
|
||||
android:background="@drawable/bg_phone_home_badge"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:minWidth="24dp"
|
||||
android:paddingHorizontal="4dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
tools:text="341"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_message"
|
||||
shape_bg_color="@{@color/red}"
|
||||
shape_radius="@{10}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@color/red"
|
||||
android:gravity="center"
|
||||
android:minWidth="20dp"
|
||||
android:paddingHorizontal="3dp"
|
||||
android:text="2"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_tab"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="58dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/white">
|
||||
android:background="@drawable/bg_phone_home_tab_bar"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingBottom="4dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
@@ -74,20 +86,20 @@
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()->viewModel.onIndexChanged(0)}"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:selected="@{viewModel.index == 0}">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:src="@{viewModel.index == 0 ? @drawable/img_pda_tab_1_s : @drawable/img_pda_tab_1_n}"
|
||||
tools:src="@drawable/img_pda_tab_1_s" />
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="首页"
|
||||
android:textColor="@{viewModel.index == 0 ? @color/colorPrimary : @color/text_gray}"
|
||||
android:textSize="12sp" />
|
||||
android:id="@+id/tv_tab_home"
|
||||
style="@style/PhoneHomeTabLabel"
|
||||
android:text="首页" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -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}">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:src="@{viewModel.index == 1 ? @drawable/img_pda_tab_2_s : @drawable/img_pda_tab_2_n}"
|
||||
tools:src="@drawable/img_pda_tab_2_s" />
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="国内"
|
||||
android:textColor="@{viewModel.index == 1 ? @color/colorPrimary : @color/text_gray}"
|
||||
android:textSize="12sp" />
|
||||
android:id="@+id/tv_tab_gn"
|
||||
style="@style/PhoneHomeTabLabel"
|
||||
android:text="国内" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -119,20 +131,20 @@
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()->viewModel.onIndexChanged(2)}"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:selected="@{viewModel.index == 2}">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:src="@{viewModel.index == 2 ? @drawable/img_pda_tab_3_s : @drawable/img_pda_tab_3_n}"
|
||||
tools:src="@drawable/img_pda_tab_3_s" />
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="国际"
|
||||
android:textColor="@{viewModel.index == 2 ? @color/colorPrimary : @color/text_gray}"
|
||||
android:textSize="12sp" />
|
||||
android:id="@+id/tv_tab_gj"
|
||||
style="@style/PhoneHomeTabLabel"
|
||||
android:text="国际" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -141,23 +153,23 @@
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()->viewModel.onIndexChanged(3)}"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:selected="@{viewModel.index == 3}">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:src="@{viewModel.index == 3 ? @drawable/img_pda_tab_4_s : @drawable/img_pda_tab_4_n}"
|
||||
tools:src="@drawable/img_pda_tab_4_s" />
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="我的"
|
||||
android:textColor="@{viewModel.index == 3 ? @color/colorPrimary : @color/text_gray}"
|
||||
android:textSize="12sp" />
|
||||
android:id="@+id/tv_tab_mine"
|
||||
style="@style/PhoneHomeTabLabel"
|
||||
android:text="我的" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
</layout>
|
||||
|
||||
Reference in New Issue
Block a user