我一直在尋找這個東西,並且我遵循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