2017-11-24 1 views
0

Ich versuche Floating-Button mit Drawerlayout hinzufügen, aber wenn ich schwebende Schaltfläche auf gewünschte Position hinzugefügt das Optionsmenü funktioniert nicht nach dem Hinzufügen schwebender Schaltfläche kann mir jemand helfen, Floating-Schaltfläche hinzufügen und alle Menüpunkte richtig arbeiten.So fügen Sie schwimmende Schaltfläche anklickbare Antwort in Android

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> 

Beispiel wie dieses Bild: enter image description here

+1

Bitte sehen: [Wie ein Minimal, Complete, und prüfbare Beispiel erstellen] (https://stackoverflow.com/help/ mcve) –

Antwort

Verwandte Themen