Rebild did, cleared the cache, there are no errors in the editor. I use navigationview.

activity_main code:

 <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:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:openDrawer="start"> <include layout="@layout/app_bar_main" android:layout_width="match_parent" android:layout_height="match_parent" /> <android.support.design.widget.NavigationView android:layout_marginTop="5dp" android:id="@+id/nav_view" android:layout_width="250dp" android:layout_height="match_parent" android:layout_gravity="start" android:fitsSystemWindows="true" android:padding="5dp" android:background="@color/colorBacgroundContent" app:headerLayout="@layout/nav_header_main" app:menu="@menu/activity_main_drawer" /> </android.support.v4.widget.DrawerLayout> 

app_bar_main code:

 <android.support.design.widget.CoordinatorLayout 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:background="@color/colorBacgroundContent" android:fitsSystemWindows="true" tools:context="com.handlingcitizen.handlingcitizen.MainActivity"> <com.roughike.bottombar.BottomBar android:id="@+id/bottomBar" android:layout_width="match_parent" android:layout_height="60dp" android:layout_gravity="bottom" app:bb_activeTabColor="@color/colorBacgroundContent" app:bb_inActiveTabAlpha="0.8" app:bb_inActiveTabColor="@color/colorBacgroundContent" app:bb_showShadow="true" app:bb_tabXmlResource="@xml/bottombar_tabs"/> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:animateLayoutChanges="true" android:theme="@style/AppTheme.AppBarOverlay"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:layout_scrollFlags="scroll|enterAlways" app:popupTheme="@style/AppTheme.PopupOverlay"/> </android.support.design.widget.AppBarLayout> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_marginBottom="70dp" android:layout_marginEnd="20dp" android:visibility="visible" app:srcCompat="@android:drawable/ic_dialog_email"/> <include layout="@layout/content_main"/> 

enter image description here enter image description here

  • 2
    Try <include layout = "@ layout / content_main" /> in front of FloatingActionButton. I think your content overlaps the button. - lllyct
  • @ lllyct thanks !!!! - upward
  • Duplicate answers, since it helped. - lllyct

1 answer 1

It is necessary to swap the content and the button, because Content overlaps this very button:

 <include layout="@layout/content_main"/> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" ... app:srcCompat="@android:drawable/ic_dialog_email"/>