Files
aerologic-app/module_p/src/main/res/layout/activity_pdaenter.xml
YANG JIANKUAN 6fb7161e80 fix(phone): 首页四个 Tab 顶栏统一为业务页标题栏样式,移除国际板箱过磅入口
- 顶栏改为 48dp、phone_primary、18sp 加粗,与 title_tool_bar 一致;状态栏同色
- 「我的」页退出图标缩小(padding 14dp),铃铛垂直居中随之微调
- 手机端国际 Tab 去掉「板箱过磅」菜单入口及对应跳转分支

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22 16:06:16 +08:00

176 lines
7.2 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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:tools="http://schemas.android.com/tools">
<data>
<variable
name="viewModel"
type="com.sixin.module_p.ui.enter.PDAEnterViewModel" />
</data>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_home_bg"
tools:context=".ui.enter.PDAEnterActivity">
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/vp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/ll_tab" />
<!--
消息铃铛(四个 Tab 共用一处、位置固定):按设计稿 domestic.html / home.html 的 .nav-bell——
34dp 按钮距右 12dp、垂直居中于 48dp 导航栏,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="7dp"
android:layout_marginEnd="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" />
<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" />
</FrameLayout>
<LinearLayout
android:id="@+id/ll_tab"
android:layout_width="match_parent"
android:layout_height="58dp"
android:layout_alignParentBottom="true"
android:background="@drawable/bg_phone_home_tab_bar"
android:paddingTop="1dp"
android:paddingBottom="4dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:onClick="@{()->viewModel.onIndexChanged(0)}"
android:orientation="vertical"
android:selected="@{viewModel.index == 0}">
<ImageView
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:id="@+id/tv_tab_home"
style="@style/PhoneHomeTabLabel"
android:text="首页" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:onClick="@{()->viewModel.onIndexChanged(1)}"
android:orientation="vertical"
android:selected="@{viewModel.index == 1}">
<ImageView
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:id="@+id/tv_tab_gn"
style="@style/PhoneHomeTabLabel"
android:text="国内" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:onClick="@{()->viewModel.onIndexChanged(2)}"
android:orientation="vertical"
android:selected="@{viewModel.index == 2}">
<ImageView
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:id="@+id/tv_tab_gj"
style="@style/PhoneHomeTabLabel"
android:text="国际" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:onClick="@{()->viewModel.onIndexChanged(3)}"
android:orientation="vertical"
android:selected="@{viewModel.index == 3}">
<ImageView
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:id="@+id/tv_tab_mine"
style="@style/PhoneHomeTabLabel"
android:text="我的" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</layout>