NestedScrollViewの内部でListViewを使用しています。 リストは親に一致するように拡大したが何のスクロールはここで今NestedScrollViewの内部でスクロールしないListView
ありませんが、私のレイアウトです:
<android.support.v4.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:fillViewport="true"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:id="@+id/workExperienceListLV"
android:divider="@null"
android:listSelector="@android:color/transparent"
android:dividerHeight="0dp"/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
このライン助けにはならなかった。助けを
android:fillViewport="true"
感謝を!
recyclerviewを使用すると、listviewでnestedscrolling機能を使用することはできません。 –
@oguzhandそれは私がlistViewで動作させることができる方法はありますか? –
ListViewでスクロールが利用可能なので、ScrollViewをラップすることはできません。代わりにlayout_heightをdpに設定すると200dpとなり、レイアウトはスクロールします。そのレイアウトでListViewのみを使用する場合は、NestedScrollViewをラップする必要はありません。 – ABI