title: Translate a View from One Layout to Another with Translate Animation
body: <p>I am new in Android animation and my requirement is to translate a view from one layout to layout in a single xml file on click of that view.</p>
  
  <p>Scenario:
  Suppose I click a button, present on the top of the header in a xml file,and it should move/translate downwards (it should give an impact that it lies on the other layout downwards to header), and also I want that when the user clicks on the same again, it should now move to its original position.</p>
  
  <p>Here I am explaining with my xml file:</p>
  
  <pre><code>     &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="@drawable/app_bg"
      android:orientation="vertical" &gt;
  
      &lt;RelativeLayout
          android:id="@+id/top"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:background="@drawable/header"
          android:paddingLeft="10dp"
          android:paddingRight="10dp" &gt;
  
          &lt;Button
              android:id="@+id/btnSearchHeader"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_centerVertical="true"
              android:layout_centerInParent="true"
              android:background="@drawable/search_icon" /&gt;
  
  
      &lt;/RelativeLayout&gt;
  
      &lt;RelativeLayout
          android:id="@+id/bottom"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:background="@color/app_transparent"
          android:paddingLeft="10dp"
          android:paddingRight="10dp"
          android:layout_marginTop="10dp"
          android:visibility="visible" &gt;
  
          &lt;Button
              android:id="@+id/btnMenu"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentLeft="true"
              android:layout_centerVertical="true"
              android:layout_marginRight="5dp"
              android:text="ABC" /&gt;
  
          &lt;Button
              android:id="@+id/btnSearchSelected"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_centerVertical="true"
              android:layout_toRightOf="@+id/btnMenu"
              android:text="CDE" /&gt;
      &lt;/RelativeLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>MORE PRECISE REQUIREMENT SPECIFICATION</strong> (Kindly read carefully:)</p>
  
  <p>Here I have two sub inner layouts:-</p>
  
  <p><strong>Top Layout - id-> top
  Bottom Layout- id -> bottom</strong></p>
  
  <p>Now a view (Button -> btnSearchHeader) is lying in my top layout and I want to animate the same to the bottom layout (it should give an impact that it is translated with a translate animation to the bottom layout) on click of that button and when the user clicks on that button, it should again translate back to its original position with a translate animation .. i.e it should show back in the top layout</p>
  
  <p>I have no idea how to give these impacts using translate animations, however i just have a basic translate animation knowledge which is insufficient for me to work upon my requirement.</p>
  
  <p>Any type of related help is appreciable.</p>
  
  <p>Thanks</p>