Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to resize my xml so that it will fit nicely on the emulator
    primarykey
    data
    text
    <p>I am currently having trouble with my GUI design because of the whole page will be shifted to the right and become like this:</p> <p><img src="https://i.stack.imgur.com/VMcK3.png" alt="enter image description here"></p> <p>create_events.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:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/crimson" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/txtDate" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" /&gt; &lt;TextView android:id="@android:id/text1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignRight="@+id/txtDate" android:layout_below="@+id/txtDate" android:layout_marginTop="16dp" android:text="Title:" android:textAppearance="?android:attr/textAppearanceMedium" /&gt; &lt;Spinner android:id="@+id/spinner1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@android:id/text1" android:layout_alignBottom="@android:id/text1" android:layout_marginLeft="34dp" android:layout_toRightOf="@android:id/text1" /&gt; &lt;TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@android:id/text1" android:layout_below="@+id/spinner1" android:layout_marginTop="18dp" android:text="Location:" android:textAppearance="?android:attr/textAppearanceMedium" /&gt; &lt;EditText android:id="@+id/editText1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/spinner1" android:layout_alignTop="@+id/textView2" android:ems="10" &gt; &lt;requestFocus /&gt; &lt;/EditText&gt; &lt;TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/textView2" android:layout_below="@+id/editText1" android:layout_marginTop="15dp" android:text="Start At:" android:textAppearance="?android:attr/textAppearanceMedium" /&gt; &lt;EditText android:id="@+id/editText2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/textView1" android:layout_alignBottom="@+id/textView1" android:layout_toRightOf="@+id/textView2" android:ems="10" android:inputType="time" /&gt; &lt;TextView android:id="@+id/textView3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/textView1" android:layout_below="@+id/editText2" android:layout_marginTop="22dp" android:text="End At:" android:textAppearance="?android:attr/textAppearanceMedium" /&gt; &lt;EditText android:id="@+id/editText3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/textView3" android:layout_toRightOf="@+id/textView2" android:ems="10" android:inputType="time" /&gt; &lt;TextView android:id="@+id/textView4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/textView3" android:layout_below="@+id/editText3" android:layout_marginTop="23dp" android:text="Alarm:" android:textAppearance="?android:attr/textAppearanceMedium" /&gt; &lt;Button android:id="@+id/btnAlarm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/textView4" android:layout_alignBottom="@+id/textView4" android:layout_alignLeft="@+id/editText3" android:text="Set Alarm" /&gt; &lt;Button android:id="@+id/btnMain" style="@style/main_menu" android:layout_width="170dp" android:layout_height="60dp" android:layout_alignParentBottom="true" android:layout_marginBottom="14dp" android:layout_toRightOf="@+id/textView1" android:background="@drawable/blue_load_picbutton" android:text="Main Menu" /&gt; &lt;Button android:id="@+id/btnEvent" style="@style/main_menu" android:layout_width="170dp" android:layout_height="60dp" android:layout_above="@+id/btnMain" android:layout_alignLeft="@+id/btnMain" android:layout_marginBottom="14dp" android:background="@drawable/blue_load_picbutton" android:text="Create Event" /&gt; &lt;TextView android:id="@+id/txtName" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_alignRight="@+id/editText1" android:text="TextView" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>I do not know the reason as to why the whole screen is shifted. The last time I opened, it was fits in the screen perfectly. Anyone has any idea why, can you please help me? Thanks.</p> <p>Edited:</p> <p><img src="https://i.stack.imgur.com/8SO1K.png" alt="enter image description here"></p> <p>After doing according to what @Andy Res said, My screen currently is displayed like this. For your reference, the skin that I am using for my emulator is WVGA854. </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