Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid pushes off LinearLayout - android development?
    primarykey
    data
    text
    <p>I am a beginner and I am working on a simple app. I have 2 pictures on the top of the screen, and one LinearLayout in the bottom all of them are assigned by "android:layout_marginTop...". The problem is, I have tried that on my sony xperia x8(320 x 480 pixels, 3.0 inches ) and the mainmenu which has 3 images(buttons) are being pushed off the screen, please help. And it does not work on the android emulator I can't open it in the emulator but I can on my phone. it says: "This.....app has stopped unexpectedly"</p> <p>This is how I want it to look like: </p> <p><a href="https://docs.google.com/a/seoulforeign.com/file/d/0Byv_19fXkk1MaGtZR3Y3Z1lsNk0/edit" rel="nofollow">https://docs.google.com/a/seoulforeign.com/file/d/0Byv_19fXkk1MaGtZR3Y3Z1lsNk0/edit</a></p> <p>This is how it looks on my sony x8 screen </p> <p><a href="https://docs.google.com/a/seoulforeign.com/file/d/0Byv_19fXkk1MaE5RazNGdVF2eHM/edit" rel="nofollow">https://docs.google.com/a/seoulforeign.com/file/d/0Byv_19fXkk1MaE5RazNGdVF2eHM/edit</a></p> <p>MinSDK :2.1 Target : 4.2</p> <p>Here is my main.xml</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/mainbg" android:orientation="vertical" tools:context=".MainActivity" &gt; &lt;ImageView android:id="@+id/imageView1" android:layout_width="220dp" android:layout_height="50dp" android:layout_gravity="left" android:layout_marginLeft="-5dp" android:layout_marginTop="10dp" android:scaleType="centerCrop" android:src="@drawable/headingmain" /&gt; &lt;ImageView android:id="@+id/imageView2" android:layout_width="300dp" android:layout_height="20dp" android:layout_gravity="right" android:layout_marginRight="-83dp" android:layout_marginTop="-12dp" android:scaleType="centerCrop" android:src="@drawable/headingby" /&gt; &lt;LinearLayout android:layout_weight="-30" android:id="@+id/MainMenu" android:layout_width="200dp" android:layout_height="200dp" android:layout_gravity="center" android:layout_marginTop="275dp" android:gravity="center" android:orientation="vertical" &gt; &lt;ImageButton android:id="@+id/imageButton1" android:layout_width="180dp" android:layout_height="55dp" android:background="@drawable/playbutton" android:padding="0dp" android:scaleType="centerCrop" android:src="@drawable/playbutton" /&gt; &lt;ImageButton android:id="@+id/imageButton2" android:layout_width="180dp" android:layout_height="55dp" android:background="@drawable/helpbutton" android:padding="0dp" android:scaleType="centerCrop" android:src="@drawable/helpbutton" /&gt; &lt;ImageButton android:id="@+id/imageButton3" android:layout_width="180dp" android:layout_height="55dp" android:background="@drawable/aboutbutton" android:padding="0dp" android:scaleType="centerCrop" android:src="@drawable/aboutbutton" /&gt; &lt;!-- end of main menu! --&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre>
    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.
 

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