Note that there are some explanatory texts on larger screens.

plurals
  1. POTable Layout Alignment?
    primarykey
    data
    text
    <p>I have designed an XML layout as in this image:</p> <p><img src="https://i.stack.imgur.com/gLRh2.jpg" alt="the four buttons in table layout"></p> <p>I need to equally place the four buttons in the screen but I am having trouble getting it to work. I tried all possible changes that I can think of. Below is the layout's XML:</p> <pre><code>&lt;RelativeLayout android:layout_width="fill_parent" android:layout_height="40dp" android:id="@+id/buttonlayout" android:layout_alignBottom="@id/framelayout"&gt; &lt;TableLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;TableRow&gt; &lt;Button android:id="@+id/previous" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/previous_icon" /&gt; &lt;Button android:id="@+id/button_startprint" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/print_icon" android:padding="10dp" /&gt; &lt;Button android:id="@+id/button_cam" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/cam_icon" android:padding="10dp" /&gt; &lt;Button android:id="@+id/next" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/next_icon" android:hapticFeedbackEnabled="true"/&gt; &lt;/TableRow&gt; &lt;/TableLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Can anyone help me out with this?</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