Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Fragment Layout - ImageView To Bottom Of Screen
    primarykey
    data
    text
    <p>****I currently have this layout, and want the 3 image views to be shown at the bottom of the screen (left, center and right). I am aligning them to the bottom using gravity property but it is not working. **** Should I use relative layout instead as I could use the alignparent bottom property?</p> <p><img src="https://i.stack.imgur.com/1rD3u.png" alt="enter image description here"></p> <p><strong>My layout file</strong></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="match_parent" android:layout_height="match_parent" android:gravity="center_vertical|center_horizontal" android:orientation="vertical" &gt; &lt;TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingBottom="3dip" android:paddingLeft="10dip" android:paddingRight="10dip" android:paddingTop="10dip" &gt; &lt;Button android:id="@+id/Btn_Show" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button 1" /&gt; &lt;Button android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button 2" /&gt; &lt;/TableRow&gt; &lt;TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingBottom="3dip" android:paddingLeft="10dip" android:paddingRight="10dip" android:paddingTop="10dip" &gt; &lt;Button android:id="@+id/button3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button 3" /&gt; &lt;Button android:id="@+id/button4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button 4" /&gt; &lt;/TableRow&gt; &lt;ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|left" android:src="@drawable/ic_launcher" /&gt; &lt;ImageView android:id="@+id/imageView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|center_horizontal" android:src="@drawable/ic_launcher" /&gt; &lt;ImageView android:id="@+id/imageView3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|right" android:src="@drawable/ic_launcher" /&gt; &lt;/LinearLayout&gt; </code></pre> <p>Thanks in advance.</p>
    singulars
    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.
    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