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"
This is how I want it to look like:
https://docs.google.com/a/seoulforeign.com/file/d/0Byv_19fXkk1MaGtZR3Y3Z1lsNk0/edit
This is how it looks on my sony x8 screen
https://docs.google.com/a/seoulforeign.com/file/d/0Byv_19fXkk1MaE5RazNGdVF2eHM/edit
MinSDK :2.1 Target : 4.2
Here is my main.xml
<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" >
<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" />
<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" />
<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" >
<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" />
<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" />
<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" />
<!-- end of main menu! -->
</LinearLayout>
</LinearLayout>