Android屏幕尺寸和分辨率

时间:2012-10-12 18:18:10

标签: android xml drawable resolution screen-size

  

可能重复:
  Android screen size resolution

我的应用程序在480x800分辨率下完美运行。如果我保持480x800的分辨率,但将屏幕尺寸更改为例如2.7英寸,3.7英寸或5.4英寸,它仍然是完美的。但是当我将分辨率更改为例如640x1066时,所有的ImageButton都太小而且在所有屏幕尺寸的错误位置...我在所有四个文件夹中创建了ImageButtons(drawable-l,m,h,xh)但仍然是按钮的大小不正确..

<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" />

注意:我的问题不是在我更改屏幕尺寸时,而是在我更改屏幕分辨率时。

0 个答案:

没有答案
相关问题