我的应用在480x800分辨率下完美运行。如果我保持480x800的分辨率,但将屏幕尺寸改为2.7英寸,3.7英寸或5.4英寸,它仍然是完美的。但是,当我将分辨率更改为例如640x1066时,所有ImageButtons都太小,并且在所有屏幕尺寸的错误位置......我在所有四个文件夹(drawable-l,m,h,xh)中创建了ImageButton,但仍然是按钮是不是在正确的大小..Android屏幕尺寸和分辨率
<ImageButton
android:id="@+id/ib1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginTop="433dp"
android:background="@drawable/imagebutton1" />
<ImageButton
android:id="@+id/ib2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="188dp"
android:layout_marginTop="436dp"
android:background="@drawable/imagebutton2" />
注意:我的问题不是当我改变屏幕大小,但当我改变屏幕分辨率。