Note that there are some explanatory texts on larger screens.

plurals
  1. POPlacing/Overlapping(z-index) in android
    text
    copied!<p>I want to make layout as the first screenshot. <img src="https://images1.wikia.nocookie.net/__cb20090901163013/uncyclopedia/images/e/eb/Blank.jpg" alt="need"> </p> <p>I tried to do, but it turned out as in the second screenshot <img src="https://images1.wikia.nocookie.net/__cb20090901163013/uncyclopedia/images/e/eb/Blank.jpg" alt="have"> </p> <p>Here my layout </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:orientation="vertical" android:padding="20dip" &gt; &lt;LinearLayout android:layout_width="wrap_content" android:layout_height="0dip" android:layout_weight="1" android:background="@color/red" android:orientation="vertical" android:paddingBottom="40dip" android:paddingLeft="10dip" android:paddingRight="10dip" android:paddingTop="10dip" &gt; &lt;LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@color/black" android:gravity="center_vertical" &gt; &lt;ScrollView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="-20dip" &gt; &lt;TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:gravity="center" android:text="lololo" /&gt; &lt;/ScrollView&gt; &lt;ImageView android:id="@+id/lady" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/temp" /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="-20dip" android:gravity="center" &gt; &lt;Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/button_left" android:text="next" /&gt; &lt;Button android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/button_right" android:text="prev" /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>I want to know how can we place one view above the other, with varying z-index? I want to know how can we place one view above the other, with varying z-index? I want to know how can we place one view above the other, with varying z-index? </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload