0
NestedScrollView
看起来像我仍然失去了一些东西。请看看我的代码我的下面。NestedScrollView与RecyclerView不<code>RecyclerView</code>在它不滚动</p> <p>我试图在这个论坛上讨论的所有选项..滚动
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fresco="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="message"
type="Post" />
</data>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<android.support.v7.widget.CardView
android:layout_height="wrap_content"
android:layout_width="match_parent"
style="@style/MyCardViewStyle"
android:layout_marginBottom="5dp"
android:id="@+id/post_card1"
>
</android.support.v7.widget.CardView>
<android.support.v7.widget.RecyclerView
android:id="@+id/image_gallery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layoutManager="LinearLayoutManager">
</android.support.v7.widget.RecyclerView>
<android.support.v7.widget.RecyclerView
android:id="@+id/doc_gallery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layoutManager="LinearLayoutManager">
</android.support.v7.widget.RecyclerView>
<android.support.v7.widget.RecyclerView
android:id="@+id/post_replies"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layoutManager="LinearLayoutManager">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</layout>
而且我在所有三个RecyclerViews
设置isNestedScrollingEnabled = false
。
屏幕只是似乎被卡住,而不是在所有的滚动
也许是因为'NestedScrollView'内的'layout_height'参数都设置为'wrap_content'?你作为结果得到什么? –
在一个案例中,我有第一个和第三个回收站点的数据。我可以看到第三个数据超出观点,但我仍然不能向下滚动。如果我将layout_height参数更改为match_parent,则不会显示recyclerviews – Rauzr
尝试将'LinearLayout'的高度设置为'match_parent'。 –