2017-11-24 10 views
0

drawerlayoutでフローティングボタンを追加しようとしていますが、フローティングボタンを追加した後にオプションメニューが機能しないという問題がありました。すべてのメニュー項目を適切に処理します。フローティングボタンのクリック可能なレスポンスを追加する方法

activity_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> 

例: enter image description here

+1

ご覧ください。https://stackoverflow.com/help/([、最小完全、かつ検証例を作成する方法] mcve) –

答えて

関連する問題