Je suis en train de développer xml avec un bouton d’image, les boutons d’image s’affichent correctement dans l’émulateur, mais cela se désorganise
appareils (par exemple, galaxy fit)
Comme décrit dans l'émulateur https://www.dropbox.com/s/qeecp868ht61sck/emulator.jpg et galaxy fit https://www.dropbox.com/s/23r9tvtp0tcn7bs/fit.jpg
Que puis-je faire?
c'est mon xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Main"
android:background="@drawable/backmain" >
<ImageButton
android:id="@+id/btnfehrest"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="53dp"
android:background="@null"
android:src="@drawable/fehrest" />
<ImageButton
android:id="@+id/btndarbareh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/btnfehrest"
android:layout_marginLeft="21dp"
android:background="@null"
android:src="@drawable/darbareh" />
<ImageButton
android:id="@+id/btnmahsulat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/btndarbareh"
android:layout_marginRight="17dp"
android:background="@null"
android:src="@drawable/mahsulat" />
<ImageButton
android:id="@+id/btnkhoruj"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/btndarbareh"
android:layout_centerHorizontal="true"
android:background="@null"
android:src="@drawable/khoruj" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/main"
android:scaleType="fitXY" />
</FrameLayout>
</RelativeLayout>
Réponses:
0 pour la réponse № 1supprime tous les layout_alignParent Cela fonctionnera