title: Android Floating buttons are not set at a fixed position
body: <p>I am showing the 2 floating buttons in my activity but the floating buttons are setting at bottom end when there is no data to show in the activity. if records are show in the activity then the floating buttons are showing after the records instead of at a fix position</p>
  
  <p>Following is my activity layout</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout
  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"&gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@color/login_background"
      android:orientation="vertical"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="200dp"
          android:layout_gravity="center"
          android:background="@color/login_header"
          android:orientation="vertical"&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginTop="5dp"
              android:orientation="horizontal"&gt;
  
              &lt;ImageView
                  android:id="@+id/imgInfo"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginStart="5dp"
                  android:src="@drawable/info" /&gt;
  
              &lt;ImageView
                  android:id="@+id/imgLogout"
                  android:layout_width="wrap_content"
                  android:layout_height="20dp"
                  android:layout_marginStart="290dp"
                  android:src="@drawable/logout" /&gt;
  
          &lt;/LinearLayout&gt;
  
          &lt;ImageView
              android:layout_width="100dp"
              android:layout_height="100dp"
              android:layout_gravity="center_horizontal|center_vertical"
              android:layout_marginTop="10dp"
              android:src="@drawable/logo1" /&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_gravity="center"
              android:orientation="horizontal"
              android:paddingStart="120dp"&gt;
  
              &lt;ImageView
  
                  android:layout_width="wrap_content"
                  android:layout_height="40dp"
                  android:layout_gravity="center_horizontal|center_vertical"
                  android:background="@color/login_header"
                  android:src="@drawable/userprofile" /&gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                  android:fontFamily="@font/segoeui"
                  android:paddingStart="20dp"
                  android:text="@string/name"
                  android:textColor="@color/white"
                  android:textSize="20sp"
                  android:textStyle="bold" /&gt;
  
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:id="@+id/machineLayout"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@color/white"
          android:orientation="vertical"&gt;
  
          &lt;android.support.v7.widget.RecyclerView
              android:id="@+id/recyclerView"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:scrollbars="vertical"&gt;
  
          &lt;/android.support.v7.widget.RecyclerView&gt;
  
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  
  &lt;android.support.design.widget.FloatingActionButton
      android:id="@+id/search"
      android:layout_width="46dp"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_gravity="bottom|end"
      android:layout_margin="@dimen/fab_margin"
      app:srcCompat="@drawable/search" /&gt;
  
  &lt;android.support.design.widget.FloatingActionButton
      android:id="@+id/addNew"
      android:layout_width="46dp"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_gravity="bottom|end"
      android:layout_margin="@dimen/fab_margin"
      app:srcCompat="@drawable/add" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>Following the screen shot
  <a href="https://i.stack.imgur.com/8FZi5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8FZi5.png" alt="enter image description here"></a></p>