【发布时间】:2013-11-21 03:58:31
【问题描述】:
我正在测试两种不同尺寸的平板电脑(7 英寸和 10 英寸)。在每个文件夹 layout-sw600dp-land 和 layout-sw720dp-land 中放置两个相同的 xml 文件。 res/drawable/中对背景drawable的引用
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/image" >
...
图像在 10 英寸上显示正常,但在 7 英寸上显示背景为白色?导致图像不显示的 sw600dp 布局可能会发生什么情况?这两个xml文件是一样的。
【问题讨论】:
-
您使用的是哪款 7 英寸平板电脑进行测试?
-
可能是个愚蠢的问题,但在 xml 中正确定义了图像的路径?
-
是的,就像我说的;背景在具有完全相同 xml 的 10 英寸平板电脑上显示良好,除了它在 layout-sw720dp-land 中
-
图片是否可能对 7in 来说太大而对 10in 来说太小了?
标签: android android-xml