Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid widget Relative Layout
    primarykey
    data
    text
    <p>I spent the last couple of days trying to make a layout.</p> <p>They layout looks great on my phone with 480x800 screen, but is messed up on my phone with 540x960 screen.</p> <p>I used dp expecting it would scale by density.</p> <p>What is going wrong?</p> <p>Here is my code for the layout xml.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="15dip" android:background="@drawable/gshock5"&gt; &lt;TextView android:id="@+id/widgetday" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="50dip" android:layout_marginTop="95sp" android:layout_centerInParent="true" android:text="DAY" android:textColor="#003300" android:textAppearance="?android:attr/textAppearanceSmall" android:textStyle="bold"/&gt; &lt;TextView android:id="@+id/widget1label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/widgetday" android:layout_centerHorizontal="true" android:clickable="true" android:textColor="#003300" android:text="Error" android:textAppearance="?android:attr/textAppearanceMedium" android:textStyle="bold"/&gt; &lt;RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_marginTop="210dip"&gt; &lt;Button android:text="Click Me!" android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_content" /&gt; &lt;/RelativeLayout&gt; &lt;/RelativeLayout&gt; </code></pre>
    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