在我的屏幕上我有一个列表视图和一个按钮。我的清单有8项。如果这两个项目不适合,我希望我的屏幕滚动。我不希望我的列表滚动,但包含列表&按钮的完整布局。如果我使用下面的布局,它只显示列表中的项目,我必须在列表中滚动才能进入下一个项目。滚动视图内的列表
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent" >
<LinearLayout
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView android:id="@android:id/list"
android:layout_height="wrap_content" android:layout_width="fill_parent"
android:background="@drawable/round_background" />
<Button android:text="Search" android:id="@+id/carSearchButton"
android:layout_gravity="center_horizontal" android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
你可以试试这个代码[non-scrollable-listview-inside-scrollview](http://stackoverflow.com/questions/18813296/non-scrollable-listview-inside-scrollview/24629341#24629341) – 2014-08-20 12:28:27