我想适合我的列表视图是滚动仅在屏幕的部分的一部分,我有一些其他的设计在屏幕的底部显示,下面是我的代码我在其中添加了布局权重= 1每个其他职位。我已经提到其他职位。制作的ListView滚动,以适应只有屏幕
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="25dp"
android:textStyle="bold"
android:text=" Computer Languages..." />
<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="1" >
</ListView>
</LinearLayout>
ListView android:layout_height =“200dp”更改dp中的列表视图高度。这取决于您希望由lisview覆盖多少大小。 –