1
以下是我的視圖的XML。 (我只加了結構)。問題是當我在列表視圖(動態生成)中有幾個元素時,輸出將顯示直到最後一個按鈕的所有內容。但是一旦視圖在listview之後越過屏幕大小的元素不顯示。但是列表視圖中的所有元素都會出現。如何解決它改變這個XML。如何在Android中的ListView之後添加元素
<?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="wrap_content">
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TableRow >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</TableRow>
</TableLayout>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</ListView>
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TableRow >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</TableRow>
</TableLayout>
<Button
android:layout_height="wrap_content"
android:layout_width="fill_parent" />
<Button
android:layout_height="wrap_content"
android:layout_width="fill_parent"/>
</LinearLayout>
簽出[此複製](http://stackoverflow.com/questions/2383847/android-layout-with-listview-and-buttons) – keyser