Note that there are some explanatory texts on larger screens.

plurals
  1. POLayers in Android Layout
    primarykey
    data
    text
    <p>I have a screen with a background image and two buttons at the bottom. I am using code similar to this:</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="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"&gt; &lt;LinearLayout android:layout_width="wrap_content" android:layout_height="0dip" android:layout_weight="1" android:orientation="vertical" android:background="@drawable/mainbg"&gt; &lt;/LinearLayout&gt; &lt;ImageButton android:layout_height="wrap_content" android:background="#FF000000" android:src="@drawable/button1" android:padding="5dp" android:id="@+id/ImageButton1" android:layout_width="fill_parent"&gt; &lt;/ImageButton&gt; &lt;ImageButton android:src="@drawable/button2" android:background="#FF000000" android:id="@+id/ImageButton2" android:layout_width="fill_parent" android:focusable="true" android:saveEnabled="false" android:layout_height="wrap_content"&gt; &lt;/ImageButton&gt; &lt;TextView android:text="mywebsite.com" android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/TextView&gt; &lt;/LinearLayout&gt; </code></pre> <p>In this code, the background screen is smashed up to fit in the remaining screen space not used by the bottons. in other words, the two button consume 20% of screen space, then the image is smashed into the remaing 80%.</p> <p><strong>My Question:</strong> Is there a way to make some kind of layering effect so that my buttons are on a layer above the background image? </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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