Files
Android-key-of-love/app/src/main/res/layout/activity_main.xml

41 lines
1.6 KiB
XML
Raw Normal View History

2025-11-26 16:47:15 +08:00
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
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"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
2025-12-31 18:36:55 +08:00
<FrameLayout
android:id="@+id/root_container"
2025-11-26 16:47:15 +08:00
android:layout_width="match_parent"
2025-12-31 18:36:55 +08:00
android:layout_height="match_parent">
<!-- 3个Tab NavHost 都 add 到这里 -->
<androidx.fragment.app.FragmentContainerView
android:id="@+id/tab_container"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!-- 全局页面覆盖层login/recharge等 -->
<androidx.fragment.app.FragmentContainerView
android:id="@+id/global_container"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
</FrameLayout>
2025-11-26 16:47:15 +08:00
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_nav"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@android:color/white"
app:menu="@menu/menu_bottom_nav"
app:itemIconTint="@null"
app:itemTextColor="@color/nav_text_color"/>
2025-12-31 18:36:55 +08:00
</androidx.coordinatorlayout.widget.CoordinatorLayout>