【发布时间】:2015-10-22 19:33:38
【问题描述】:
我正在使用drawable 设置RelativeLayout 的背景,这是第一次打开活动时的correct result。
但是,当我切换到另一个活动(具有相同背景)并返回到旧活动时,背景会缩放到它的可绘制大小which is wrong。
或者有时,在其他活动中也是如此(大小错误)。这是我用于布局根元素的常见 XML 布局:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/backgroundLayForBg"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- custom childs -->
</RelativeLayout>
什么会导致这个问题?
编辑:如果我设置背景颜色,我不会遇到任何问题。
【问题讨论】:
标签: android android-layout drawable