2024-04-01

MainActivity的layout

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    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"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="?attr/colorPrimary"
            android:minHeight="?attr/actionBarSize"
            android:fitsSystemWindows="true"
            android:theme="@style/Widget.AppCompat.Toolbar"
            app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
    </com.google.android.material.appbar.AppBarLayout>

    <FrameLayout
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"/>

    <com.google.android.material.bottomnavigation.BottomNavigationView
        android:id="@+id/navigation_bottom"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:menu="@menu/menu_navigation"
        android:background="?android:attr/windowBackground"/>

</LinearLayout>

 

posted @ 2024-05-07 16:07  kxzzow  阅读(4)  评论(0)    收藏  举报