title: Sliding one layout on another in android
body: <p>I need to slide one layout on another in android.</p>
  
  <p>Requirments.</p>
  
  <p><strong>1</strong> . <strong>layout1</strong> covers 80% of the screen and the rest is occupied by <strong>layout 2</strong>.</p>
  
  <p><img src="https://i.stack.imgur.com/KGv0Q.png" alt="enter image description here"></p>
  
  <p><strong>2</strong> . I need to be able to <strong>slide</strong> <strong>layout 2</strong> on top of <strong>layout 1</strong>, 
      total width or scrollable limit for layout 2 should be such that
      <strong>20% of layout 1</strong> should be visible below.</p>
  
  <p><img src="https://i.stack.imgur.com/KpVpR.png" alt="enter image description here"></p>
  
  <p><strong>3</strong> . Then i need to slide <strong>layout 2 back</strong> to its original position.</p>
  
  <p><img src="https://i.stack.imgur.com/pBAfy.png" alt="enter image description here"></p>
  
  <p>I have tried may sliding tutorials including </p>
  
  <p><a href="https://github.com/jfeinstein10/SlidingMenu" rel="nofollow noreferrer" title="Sliding Menu by Jfeinstein">Sliding Menu by Jfeinstein</a></p>
  
  <p><a href="http://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.html" rel="nofollow noreferrer">Slide Panel Layout - Android</a></p>
  
  <p>and many other tutorials available in the internet.</p>
  
  <p>None of these was able to provide what i need, i tried many customizations and spent almost a week, </p>
  
  <p>could someone help.</p>