Java 按钮未出现在我的线性布局中

Java 按钮未出现在我的线性布局中,java,android,listview,button,android-linearlayout,Java,Android,Listview,Button,Android Linearlayout,我有一个按钮内的线性布局,是面向垂直。不知道为什么按钮没有出现 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"> <com.commonsware.cwac.tlv.TouchListView xmlns:android="

我有一个按钮内的线性布局,是面向垂直。不知道为什么按钮没有出现

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical">
<com.commonsware.cwac.tlv.TouchListView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tlv="http://schemas.android.com/apk/res/org.stocktwits.activity"

    android:id="@android:id/list"
    android:layout_width="fill_parent"
    android:drawSelectorOnTop="false"
    tlv:normal_height="64dip"
    tlv:grabber="@+id/icon"
    tlv:remove_mode="slideRight"
android:layout_height="wrap_content"/>
<Button android:text="Button" android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>

</LinearLayout>

尝试将其添加到线性布局中:

android:layout_width="fill_parent"
android:layout_height="fill_parent"

我猜布局只是没有显示?

android:height=“wrap\u content”
对于垂直滚动的小部件(如
ListView
)没有任何意义。使用
android:layout\u weight
和您的
LinearLayout
RelativeLayout
来实现您想要实现的任何外观。

如果您(临时)取出TouchListView,它会出现吗?这个android:id=“@android:id/list”正确吗?我认为正确的一个是android:id=“@+id/list”,如果我取出TouchListView,它就会出现。或者,TouchListView也会出现,布局中没有按钮。您能举个例子吗?我试图在相对布局中将按钮指定在列表下方,但没有成功。@Sheehan Alam: