android - RelativeLayout displays incorrect on real device -


i have question regarding android relativelayout. layout works on emulator configured lg nexus4 (screen, resolution). if run app on real nexus4 has serious errors , don't know how fix them.

here layout:

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@+id/mainmenulayout"     android:layout_width="match_parent"     android:layout_height="match_parent" >      <imageview         android:id="@+id/zeekedlogo"         android:contentdescription="@string/logo"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparentbottom="true"         android:layout_alignparentright="true"         android:layout_marginbottom="24dp"         android:layout_marginright="24dp"         android:src="@drawable/badge" />      <textview         android:id="@+id/textbuttonplay"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparenttop="true"         android:layout_centerhorizontal="true"         android:layout_margintop="56dp"         android:text="@string/menu_play"         android:textappearance="?android:attr/textappearancelarge" />      <textview         android:id="@+id/textbuttonresume"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_below="@+id/textbuttonplay"         android:layout_centerhorizontal="true"         android:layout_margintop="20dp"         android:text="@string/menu_resume"         android:textappearance="?android:attr/textappearancelarge" />      <textview         android:id="@+id/textlabellevel"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_above="@+id/zeekedlogo"         android:layout_centerhorizontal="true"         android:layout_marginbottom="54dp"         android:text="@string/menu_level"         android:textappearance="?android:attr/textappearancemedium" />      <textview         android:id="@+id/textbuttonsound"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignbottom="@+id/zeekedlogo"         android:layout_marginleft="24dp"         android:text="@string/menu_sound_on"         android:textappearance="?android:attr/textappearancelarge" />  </relativelayout> 

here screenshots of same layout:

emulator:

enter image description here

nexus 4:

enter image description here

thanks in advance!

after adding background color relativelayout worked on nexus4. it's did ... , think it's strange. @ end i'm happy works.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -