我有一张纵向模式的图像,可以正确显示。当我将配置更改为横向时,不显示图像。
请注意,LinearLayout
,包含ImageView
显示正确(我通过更改背景进行检查)。但是当我改变背景时ImageView
,背景也没有显示。
<LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="10dp" android:layout_weight="3">
<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_vertical" android:minHeight="48dp" android:minWidth="48dp" android:src="@drawable/xyz" android:id="@+id/img"/>
您是否有为纵向和横向指定不同的文件?即,布局文件夹和布局土地文件夹中是否有同名的布局文件?如果是这样,请确保这两个文件都包含 ImageView。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)