RecyclerView里面怎么用NestedScrollView?
RecyclerView设置适配器后内容不可见.
UPDATE布局代码已更新.
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/keyline_1">
</RelativeLayout>
<View
android:id="@+id/separator"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#e5e5e5" />
<android.support.v7.widget.RecyclerView
android:id="@+id/conversation"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
Run Code Online (Sandbox Code Playgroud) 我想知道有没有可能的方法来使用RecyclerView?
在此之前,我在ScrollView中使用具有修复高度的 RecyclerView,但这次我不知道项目的高度.
提示:我在4天前提出这个问题之前,先阅读了堆栈问题的所有问题和解决方案.
更新: 一些解决方案学习如何自己滚动RecyclerView但我想展示这个扩展.