我一直在寻找这个东西,并且我遵循Android支持多屏幕的文档。我有我的手机是mdpi,是320x480。我也有我的平板电脑是mdpi,并且是600x976。我在我的drawable-mdpi/myimg.png中有一个图像(320x581),在我的drawable-hdpi/myimg.png中有一个图像(640x1162)。我也有layout/mylayout.xml和layout-large/mylayout.xml。所以我的问题是,为什么我的平板电脑不显示全屏图像,因为我期待图像将覆盖整个屏幕?任何帮助将非常感激。 下面是我的布局layout/mylayout.xml和layout-large/mylayout.xml的代码。手机和平板电脑android的布局
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/myimg"
android:layout_centerInParent="true"/>
</RelativeLayout>
取决于你的布局如何看?如果您的布局限制到某个宽度,例如... – Nanne
您需要从布局中提供圆顶代码示例。 – guydemossyrock
'我的手机是mdpi,尺寸是320x480。我也有我的平板电脑这是mdpi和600x976' - 所以你如何期望它从hdpi文件夹中选择一个图像,因为这两个设备都是'mdpi' – mihail