我創建了小的,正常的,大的和xl的佈局,當我運行代碼時,我做了 這是兩個都是正常屏幕尺寸時的結果。 如果我解決了其中一個得到了混亂,反之亦然。他們是解決這個問題的另一種方式,或者如何解決這個問題Android和支持Multiscreen的顯示圖像問題
HTC一個V-
三星S3
用於正常佈局的代碼
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background1"
android:gravity="fill_vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/seekBar1"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:src="@drawable/pumpkin" />
<ImageButton
android:id="@+id/imageButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="500dp"
android:layout_marginTop="150dp"
android:background="@null"
android:src="@drawable/righteyeoff" />
<SeekBar
android:id="@+id/seekBar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/imageView1"
android:layout_alignParentBottom="true"
android:thumb="@drawable/skull" />
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="350dp"
android:layout_marginTop="150dp"
android:background="@null"
android:src="@drawable/lefteyeoff" />
</RelativeLayout>
您不能定義一個空layout_width /身高的形象圖,這是非法的 – JoxTraex
我沒有寫這直接複製。 user1975060可以用他或她想要的任何傾角或填充來填充它 – heLL0