如何在android中添加底部应用程序栏和菜单?

如何在android中添加底部应用程序栏和菜单?,android,menu,android-bottomappbar,Android,Menu,Android Bottomappbar,我想在活动底部添加菜单。我无法添加菜单项,如何在底部应用程序栏中添加菜单 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/container_layout" android:layout_width="match_parent" android:l

我想在活动底部添加菜单。我无法添加菜单项,如何在底部应用程序栏中添加菜单

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/container_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >
<include
        android:id="@+id/include"
         layout="@layout/appbar"/>
    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
     <com.google.android.material.bottomappbar.BottomAppBar
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:id="@+id/bottomAppBar"
      style="@style/Widget.MaterialComponents.BottomAppBar"
      android:layout_gravity="bottom"
      android:layout_marginTop="548dp"
      android:backgroundTint="#ffffff">
     </com.google.android.material.bottomappbar.BottomAppBar>
     </androidx.coordinatorlayout.widget.CoordinatorLayout>
 </LinearLayout>


参考此-->这是否回答了您的问题?不,那不是我的答案。