Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>See if this works for you. It doesnt center quite perfectly but it does align well across multiple screen sizes.</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FFFF0000"&gt; &lt;LinearLayout android:id="@+id/top_row" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:orientation="vertical" android:layout_centerHorizontal="true" android:layout_width="wrap_content" android:layout_marginTop="25dip"&gt; &lt;LinearLayout android:layout_height="wrap_content" android:orientation="horizontal" android:layout_width="fill_parent"&gt; &lt;TextView android:layout_height="wrap_content" android:text="User Id" android:gravity="right" android:layout_marginRight="10dip" android:layout_width="fill_parent" android:layout_weight="2" android:textColor="#FF000000"&gt;&lt;/TextView&gt; &lt;EditText android:layout_height="wrap_content" android:layout_width="fill_parent" android:ems="10" android:layout_weight="1"&gt;&lt;/EditText&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:layout_height="wrap_content" android:orientation="horizontal" android:layout_width="fill_parent"&gt; &lt;TextView android:layout_height="wrap_content" android:text="Password" android:gravity="right" android:layout_marginRight="10dip" android:layout_width="fill_parent" android:layout_weight="2" android:textColor="#FF000000"&gt;&lt;/TextView&gt; &lt;EditText android:layout_height="wrap_content" android:layout_width="fill_parent" android:ems="10" android:layout_weight="1"&gt;&lt;/EditText&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:layout_height="wrap_content" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_below="@+id/top_row" android:layout_centerHorizontal="true" android:layout_marginTop="20dip"&gt; &lt;Button android:layout_width="wrap_content" android:text="LOGIN" android:layout_height="wrap_content" android:layout_marginRight="10dip"&gt;&lt;/Button&gt; &lt;Button android:text="REGISTER" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginLeft="10dip"&gt;&lt;/Button&gt; &lt;/LinearLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Here's what it looks like in my IDE...</p> <p><img src="https://i.stack.imgur.com/6Iroa.png" alt="enter image description here"></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