0
由于某种原因,此布局不能按预期工作。这两个文本框是重叠的,尽管我使用的是layout_below标签。我究竟做错了什么?嵌套布局
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/white">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/actionbar"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/homeButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Dashboard" />
</LinearLayout>
<RelativeLayout android:id="@+id/dashboard"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/actionbar">
<TextView android:id="@+id/libraryButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Dashboard Area" />
</RelativeLayout>
</LinearLayout>
其实我正在使用父级布局(抱歉没有粘贴)。然而,我并没有明确命名一个android:方向,我现在看到那是我的问题。非常感谢! – Matthew 2010-11-28 22:11:34