title: android Floating Action Button change view anchor dynamically
body: <p>I have a floating action button in the layout file of the fragment, Which signifies action to add data. I have used coordination layout of design support library and inside the <code>CoordinationLayout</code> I have put the linear layout holding 2 views in it and a floating action button.</p>
  
  <pre><code> &lt;android.support.design.widget.CoordinatorLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          &gt;
  
          &lt;LinearLayout
              android:id="@+id/dataLayout"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:visibility="gone"
              android:animateLayoutChanges="true"
              android:orientation="vertical"&gt;
  
              &lt;View
                  android:id="@+id/viewA"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:layout_weight="0.6"
                  android:background="@android:color/holo_purple"
               /&gt;
  
              &lt;View
                  android:id="@+id/viewB"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:layout_weight="0.4"
  
                  android:background="@android:color/holo_orange_light"
              /&gt;
  
          &lt;/LinearLayout&gt;
  
          &lt;android.support.design.widget.FloatingActionButton
              android:id="@+id/actionAddMembers"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:src="@drawable/ic_add_white_24dp"
              app:borderWidth="0dp"
              app:elevation="4dp"
              android:layout_alignParentBottom="true"
              android:layout_alignParentEnd="true"
              android:layout_alignParentRight="true"
              android:layout_gravity="bottom|right"/&gt;
      &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>Now initially the linear layout holding the 2 views would have <code>visibility=gone</code>. I want to bring the view in front when I click on floating action button. and I would like to anchor the FAB to the end of view A when the view appears on screen. I have seen that I can put the anchor in layout file and which makes my view static. I want to change this during run time when the view A appears on click of FAB . I couldnt find the any relavent methods in the <code>FLoatingActionButton</code> object to change the anchor dynamically . 
  Kindly suggest me how can i achieve this task</p>