嵌套滚动视图内滚动视图不起作用
问题描述:
它是真的还是不是?我想通过使用嵌套滚动视图在我的活动内的列表视图上滚动。请帮忙。在此先感谢嵌套滚动视图内滚动视图不起作用
<android.support.v4.widget.NestedScrollView
android:id="@+id/login_form"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/insertkend_form"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/listAksesoris">
</ListView>
</ScrollView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
答
这是现在的工作,只是删除scrollview
,并添加listview
android:nestedScrollingEnabled="true"
。
+0
为我工作谢谢 –
此布局很奇怪 - 您有3层滚动视图(NestedScrollView,ScrollView和ListView)。最大的问题是为什么你需要所有这些? –
首先我在'nestedscrollview'和'listview'中建立一个表单,我需要使用复选框来检查一些选项。我希望你明白我的意思。 @ DoronYakovlev-Golani –