title: Put the Floating action button on Top always
body: <p>I have Mainactivity, one Fragment and BlogRecycleadapter to populate the Fragment with Blog post.</p>
  
  <p>Inside Mainactivity, I have Floating action Button. But When I run the app It hides beneath the items of blogRecycleadapter.</p>
  
  <p>How can I make Floating action button always on Top??</p>
  
  <p><a href="https://i.stack.imgur.com/9ndAL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9ndAL.png" alt="enter image description here"></a></p>
  
  <p>My mainactivity layout is</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout 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=".Main2Activity"&gt;
  
      &lt;android.support.v7.widget.Toolbar
          android:id="@+id/main_toolbar"
          app:titleTextAppearance="@style/Toolbar.TitleText"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorPrimary"
          android:theme="@style/ThemeOverlay.AppCompat.Light"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent"&gt;&lt;/android.support.v7.widget.Toolbar&gt;
  
  
  
      &lt;android.support.design.widget.BottomNavigationView
          android:id="@+id/mainBottomNav"
          android:background="@color/colorblog"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          app:menu="@menu/bottom_menu"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent" /&gt;
  
      &lt;android.support.design.widget.FloatingActionButton
          android:id="@+id/add_post_btn"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginBottom="16dp"
          android:layout_marginEnd="16dp"
          android:layout_marginRight="16dp"
          android:clickable="true"
          android:layout_gravity="bottom|end"
          android:focusable="true"
          android:visibility="visible"
          app:elevation="6dp"
          app:layout_constraintBottom_toTopOf="@+id/mainBottomNav"
          app:layout_constraintEnd_toEndOf="parent"
          app:srcCompat="@mipmap/action_add" /&gt;
  
  
      &lt;FrameLayout
          android:id="@+id/main_container"
          android:layout_width="0dp"
          android:layout_height="0dp"
          app:layout_constraintBottom_toTopOf="@+id/mainBottomNav"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintHorizontal_bias="1.0"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toBottomOf="@+id/main_toolbar"
          app:layout_constraintVertical_bias="1.0"&gt;
  
      &lt;/FrameLayout&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>and my fragment layout is ,</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".HomeFragment"&gt;
  
      &lt;!-- TODO: Update blank fragment layout --&gt;
  
      &lt;android.support.v7.widget.RecyclerView
          android:id="@+id/blog_list_view"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  &lt;/FrameLayout&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>and my blogRecycleadapter class  is</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout 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="wrap_content"&gt;
  
      &lt;android.support.v7.widget.CardView
          android:id="@+id/main_blog_post"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_marginEnd="8dp"
          android:layout_marginStart="8dp"
          android:layout_marginTop="8dp"
          android:padding="20dp"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent"&gt;
  
          &lt;android.support.constraint.ConstraintLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"&gt;
  
              &lt;ImageView
                  android:id="@+id/blog_like_btn"
                  android:layout_width="32dp"
                  android:layout_height="32dp"
                  android:layout_marginBottom="8dp"
                  android:layout_marginStart="16dp"
                  android:layout_marginLeft="16dp"
                  android:layout_marginTop="8dp"
                  app:layout_constraintBottom_toBottomOf="parent"
                  app:layout_constraintStart_toEndOf="parent"
                  app:layout_constraintStart_toStartOf="parent"
                  app:layout_constraintTop_toBottomOf="@+id/blog_desc"
                  app:srcCompat="@mipmap/action_like_gray" /&gt;
  
              &lt;de.hdodenhof.circleimageview.CircleImageView
                  android:id="@+id/blog_user_image"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="8dp"
                  android:layout_marginStart="16dp"
                  android:layout_marginTop="16dp"
                  android:src="@drawable/profile_placeholder"
                  app:layout_constraintStart_toStartOf="parent"
                  app:layout_constraintTop_toTopOf="parent" /&gt;
  
              &lt;TextView
                  android:id="@+id/blog_user_name"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="8dp"
                  android:layout_marginStart="8dp"
                  android:layout_marginTop="16dp"
                  android:text="Username"
                  android:textStyle="bold"
                  app:layout_constraintStart_toEndOf="@+id/blog_user_image"
                  app:layout_constraintTop_toTopOf="parent" /&gt;
  
              &lt;TextView
                  android:id="@+id/blog_date"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="8dp"
                  android:layout_marginStart="8dp"
                  android:text="Blog Post Date"
                  app:layout_constraintStart_toEndOf="@+id/blog_user_image"
                  app:layout_constraintTop_toBottomOf="@+id/blog_user_name" /&gt;
  
              &lt;ImageView
                  android:id="@+id/blog_image"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_marginTop="16dp"
                  android:scaleType="centerCrop"
                  app:layout_constraintEnd_toEndOf="parent"
                  app:layout_constraintStart_toStartOf="parent"
                  app:layout_constraintTop_toBottomOf="@+id/blog_user_image"
                  app:srcCompat="@drawable/image_placeholder" /&gt;
  
              &lt;TextView
                  android:id="@+id/blog_desc"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_marginEnd="16dp"
                  android:layout_marginStart="16dp"
                  android:layout_marginTop="16dp"
                  android:text="Lorem ipsum dolor sit amet, soluta regione urbanitas vis in, qui elit populo ut. "
                  app:layout_constraintEnd_toEndOf="parent"
                  app:layout_constraintStart_toStartOf="parent"
                  app:layout_constraintTop_toBottomOf="@+id/blog_image" /&gt;
  
              &lt;TextView
                  android:id="@+id/blog_like_count"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginBottom="8dp"
                  android:layout_marginLeft="8dp"
                  android:layout_marginStart="8dp"
                  android:layout_marginTop="8dp"
                  android:text="0 Likes"
                  app:layout_constraintBottom_toBottomOf="parent"
                  app:layout_constraintStart_toEndOf="@+id/blog_like_btn"
                  app:layout_constraintTop_toBottomOf="@+id/blog_desc" /&gt;
  
  
  
  
          &lt;/android.support.constraint.ConstraintLayout&gt;
      &lt;/android.support.v7.widget.CardView&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;</code></pre>
  </div>
  </div>
  </p>