Note that there are some explanatory texts on larger screens.

plurals
  1. POEqual vertically spaced columns layout
    primarykey
    data
    text
    <p><img src="https://i.stack.imgur.com/HPKfE.png" alt="enter image description here"></p> <p>I want to make this layout on my main screen of my application. I have stripes for each image block shown above. Please guide my which layout (RelativeLayout, LinearLayout...etc) should I use to achieve this. I am new to android development. I have experimented few layout but not having success. I also used FrameLayout</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:stretchColumns="1"&gt; &lt;TableRow&gt; &lt;FrameLayout android:id="@+id/inboxLargeButton" android:layout_height="wrap_content" android:layout_width="0dp" android:layout_weight="1"&gt; &lt;ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/inbox_normal" android:id="@+id/buttonWeddingDayCheatSheet" android:layout_gravity="center_horizontal"&gt; &lt;/ImageView&gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="2631" android:layout_gravity="bottom" android:gravity="center" android:textColor="#fff" android:textSize="50dp" /&gt; &lt;/FrameLayout&gt; &lt;FrameLayout android:layout_height="wrap_content" android:layout_width="0dp" android:layout_weight="1"&gt; &lt;ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/outbox_normal" android:id="@+id/buttonShareFavoriteRecipe" android:layout_gravity="center_horizontal"&gt; &lt;/ImageView&gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="0296" android:layout_gravity="bottom" android:gravity="center" android:textColor="#fff" android:textSize="50dp" /&gt; &lt;/FrameLayout&gt; &lt;/TableRow&gt; &lt;TableRow&gt; &lt;FrameLayout android:layout_height="wrap_content" android:layout_width="0dp" android:layout_weight="1"&gt; &lt;ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/header_left_normal" android:id="@+id/buttonWeddingDayCheatSheet" android:layout_gravity="center_horizontal"&gt; &lt;/ImageView&gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Most sent" android:layout_gravity="bottom" android:gravity="center" android:textColor="#fff" android:textSize="15dp" /&gt; &lt;/FrameLayout&gt; &lt;FrameLayout android:layout_height="wrap_content" android:layout_width="0dp" android:layout_weight="1"&gt; &lt;ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/header_right_normal" android:id="@+id/buttonShareFavoriteRecipe" android:layout_gravity="center_horizontal"&gt; &lt;/ImageView&gt; &lt;/FrameLayout&gt; &lt;/TableRow&gt; &lt;TableRow&gt; &lt;FrameLayout android:layout_height="wrap_content" android:layout_width="0dp" android:layout_weight="1"&gt; &lt;ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/body_left_normal" android:id="@+id/buttonWeddingDayCheatSheet" android:layout_gravity="center_horizontal"&gt; &lt;/ImageView&gt; &lt;/FrameLayout&gt; &lt;FrameLayout android:layout_height="wrap_content" android:layout_width="0dp" android:layout_weight="1"&gt; &lt;ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/body_right_normal" android:id="@+id/buttonShareFavoriteRecipe" android:layout_gravity="center_horizontal"&gt; &lt;/ImageView&gt; &lt;/FrameLayout&gt; &lt;/TableRow&gt; &lt;/TableLayout&gt; </code></pre> <p>As I want to make the each block clickable too. </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.
    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