我正在尝试添加带有抽屉布局的浮动按钮,但是当我在所需的位置添加浮动按钮时,选项菜单在添加浮动按钮后不起作用任何人都可以帮助我添加浮动按钮并正确工作所有菜单项。
活动_main.xml:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout 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="com.example.bskes.zonevi.ui.MainActivity"
android:id="@+id/drawerlayout">
<LinearLayout
android:id="@+id/verticalLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/navactionbar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<android.support.design.widget.NavigationView
android:id="@+id/navigation_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
app:headerLayout="@layout/navheader"
app:menu="@menu/navlist">
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>
像这个图像的例子:在此处输入图像描述
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句