【发布时间】:2011-06-22 22:29:08
【问题描述】:
我正在将一个现有的 android 应用程序移植到 honeycomb 以及 Fragments API 和兼容性库。我使用相同的布局,但我将它加载到一个片段中。背景是 9patch 图像,但它现在只覆盖屏幕的左上角四分之一。背景的其余部分是白色的。如果我将背景更改为十六进制颜色,它将覆盖整个屏幕。这在切换到片段之前从未发生过,并且布局没有改变。我对 Android 有点陌生,对 Fragment 也很陌生,所以我不确定我是否遗漏了一些东西。该问题似乎与 9patch 图像有关,但我对 Android 的了解还不够,无法肯定地说。
我的布局是这样的:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/splash_background">
【问题讨论】:
标签: android android-3.0-honeycomb android-fragments nine-patch