Android 表不包括';t在布局中显示内容

Android 表不包括';t在布局中显示内容,android,xml,android-layout,Android,Xml,Android Layout,我想为我的Android应用程序创建一个包含文本和表格的线性布局。 显示TextView,但隐藏TableLayout或类似的内容 我想不出问题出在哪里 以下是我布局的一些代码: <LinearLayout android:id="@+id/ListWrapper" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_ve

我想为我的Android应用程序创建一个包含文本和表格的线性布局。 显示TextView,但隐藏TableLayout或类似的内容

我想不出问题出在哪里

以下是我布局的一些代码:

<LinearLayout
    android:id="@+id/ListWrapper"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:gravity="center_vertical"
    android:orientation="horizontal"
    android:layout_gravity="top"
    android:background="@color/listBackground" >

    <TextView
        android:id="@+id/aboutScreenMainText"
        android:text="@string/helpPage.mainText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="18dp"
        android:layout_marginTop="5dp"
        android:layout_marginLeft="5dp"
        android:layout_gravity="top"
        android:textColor="#000" />

    <TableLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <TableRow
            android:layout_width="fill_parent"
            android:layout_height="50dp">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/helpPage.addNoteText" />
            <View
                android:layout_width="fill_parent"
                android:layout_height="1dp"
                android:background="@color/mainTextColor">
             </View>
        </TableRow>   
    </TableLayout>

</LinearLayout>

这个问题的解决方法很简单;)
布局的方向是“水平”而不是“垂直”。

隐藏是什么意思?TableLayout本身没有任何可显示的内容。您想看到的是边框吗?我喜欢在一个活动中显示文本视图和包含内容的表格布局。问题是只显示TextView,而TableLayout不可见。好的,我发现了错误。外部线性布局的方向为“水平”。无法使用此属性;)