title: parallax scrolling in android
body: <p>I have a layout which i want to apply parallax scrolling on. My layout is as follows :</p>
  
  <p><img src="https://i.stack.imgur.com/3otjL.png" alt="enter image description here"></p>
  
  <p>And the relevant XML is :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="vertical"&gt;
      &lt;RelativeLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:id="@+id/top_control_bar"
          android:background="@drawable/container_dropshadow"&gt;
          &lt;RelativeLayout
              android:id="@+id/logo_layout"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_gravity="center_vertical"
              android:background="#ffffff"&gt;
              &lt;ImageView
                  android:id="@+id/organiser_logo"
                  android:adjustViewBounds="true"
                  android:scaleType="centerCrop"
                  android:layout_centerInParent="true"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content" /&gt;
          &lt;/RelativeLayout&gt;
      &lt;/RelativeLayout&gt;
      &lt;RelativeLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:id="@+id/bottom_layout"
          android:layout_below="@+id/top_control_bar"&gt;
          &lt;LinearLayout
              android:orientation="vertical"
              android:minWidth="25px"
              android:minHeight="25px"
              android:layout_width="fill_parent"
              android:layout_below="@+id/top_control_bar"
              android:layout_height="wrap_content"
              android:background="@drawable/container_dropshadow"
              android:id="@+id/explanation_wrapper"&gt;
              &lt;TextView
                  android:text="@string/no_event_header"
                  android:textAppearance="?android:attr/textAppearanceLarge"
                  android:id="@+id/explanation_header"
                  android:padding="8dip"
                  android:layout_width="wrap_content"
                  android:layout_height="fill_parent" /&gt;
              &lt;TextView
                  android:text="@string/no_event_text_1st_paragraph"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:id="@+id/explanation_1st_paragraph"
                  android:paddingTop="8dip"
                  android:paddingRight="20dip"
                  android:paddingBottom="10dip"
                  android:paddingLeft="10dip" /&gt;
          &lt;/LinearLayout&gt;
          &lt;ListView
              android:id="@+id/album_active_list"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:choiceMode="singleChoice"
              android:background="@drawable/container_dropshadow"
              android:layout_below="@+id/explanation_wrapper" /&gt;
      &lt;/RelativeLayout&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I need to get the middle layer to be scrolled over the bottom layer. And when there is no space left in the top (middle layer is completely scrolled over bottom layer), then i need the top layer to be scrolled over the Middle layer.</p>
  
  <p>How would i achieve this behaviour?</p>