我在相对布局中具有 2 个列表视图 1 的布局,如下所示
<RelativeLayout 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: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" >
<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
<ListView
android:id="@+id/listView2"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</RelativeLayout>
因此,根据添加的视图,根据客户设计,第二个列表视图被放置在第一个列表视图之上。
现在我的要求是我想要第二个列表视图,即上面放置的列表视图是固定的,下面放置的列表视图应该是可滚动的,因为第一个列表视图最多有 5 个项目。目前它发生的情况与此完全相反。我试过了
android:focusable="false" android:clickable="false"
但没有运气。请帮助我解决这个问题或告诉我任何其他方法