Java nestedScrollView中的水平回收器视图无法正常工作

Java nestedScrollView中的水平回收器视图无法正常工作,java,android,scroll,android-recyclerview,android-nestedscrollview,Java,Android,Scroll,Android Recyclerview,Android Nestedscrollview,nestedscrollView中的水平RecyclerView无法正常工作。当我水平滚动RecyclerView时,我的NestedScrollView以垂直滚动的方式捕捉输入,并且水平滚动仅四次一次工作正常。我如何解决它?我对普通的滚动视图没有问题。我还尝试过horizontalScrollView,我也遇到了同样的问题。 我必须使用nestedScrollView,因为我想使用折叠图像和工具栏 以下是我的xml代码: <?xml version="1.0" encoding="utf

nestedscrollView中的水平RecyclerView无法正常工作。当我水平滚动RecyclerView时,我的NestedScrollView以垂直滚动的方式捕捉输入,并且水平滚动仅四次一次工作正常。我如何解决它?我对普通的滚动视图没有问题。我还尝试过horizontalScrollView,我也遇到了同样的问题。 我必须使用nestedScrollView,因为我想使用折叠图像和工具栏

以下是我的xml代码:

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
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:id="@+id/coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"

>

<android.support.design.widget.AppBarLayout

    android:id="@+id/main.appbar"
    android:layout_width="match_parent"
    android:layout_height="174dp"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"

    >

    <android.support.design.widget.CollapsingToolbarLayout

        android:id="@+id/main.collapsing"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true"
        app:contentScrim="?attr/colorPrimary"
        app:expandedTitleMarginEnd="64dp"
        app:expandedTitleMarginStart="48dp"
        app:layout_scrollFlags="scroll|exitUntilCollapsed"

        >


        <ImageView

            android:id="@+id/main.backdrop"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fitsSystemWindows="true"
            android:scaleType="centerCrop"
            android:src="@drawable/test_primi"
            app:layout_collapseMode="parallax"

            />


        <android.support.v7.widget.Toolbar

            android:id="@+id/main.toolbar"
            android:layout_width="match_parent"
            android:layout_height="54dp"
            app:layout_collapseMode="pin"
            app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
            android:layout_gravity="top"

            >

        </android.support.v7.widget.Toolbar>

        <RelativeLayout

            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom"
            app:layout_scrollFlags="scroll|enterAlwaysCollapsed"

            >

            <LinearLayout

                android:id="@+id/linear_layout_titolo_toolbar_primi"
                android:layout_width="match_parent"
                android:layout_height="56dp"
                android:orientation="horizontal"
                app:layout_scrollFlags="scroll|enterAlwaysCollapsed"

                >

                <ImageView

                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_gravity="center"
                    android:onClick="backToRicette"
                    android:padding="8dp"
                    android:src="@drawable/icona_freccia_back_bianca"

                    />

                <TextView

                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginLeft="18dp"
                    android:fontFamily="@font/roboto_medium"
                    android:gravity="start|center"
                    android:text="Primi"
                    android:textColor="@color/titoliToolbar"
                    android:textSize="@dimen/dimensioneTitoliToolbar"

                    />

            </LinearLayout>

        </RelativeLayout>

    </android.support.design.widget.CollapsingToolbarLayout>


</android.support.design.widget.AppBarLayout>

<android.support.v4.widget.NestedScrollView

    android:id="@+id/nested_scroll_view_ricette_primi"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:addStatesFromChildren="false"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"

    >

        <LinearLayout

            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/body"
            android:orientation="vertical"

            >

            <!-- paragrafo "top 10 ricette" comprendente titolo immagini e testo sotto le immagini -->
            <LinearLayout

                android:id="@+id/linear_layout_ricette_top_10"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/margineLateraleLayout"
                android:layout_marginRight="@dimen/margineLateraleLayout"
                android:layout_marginTop="@dimen/margineTraLayout"
                android:layout_marginBottom="@dimen/margineTraLayout"
                android:background="@color/transparent"
                android:elevation="2dp"
                android:orientation="vertical"

                >

                <TextView

                    android:id="@+id/text_view_top_10_ricette"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="8dp"
                    android:layout_marginLeft="8dp"
                    android:layout_marginTop="8dp"
                    android:fontFamily="@font/roboto_medium"
                    android:text="Top 10 Primi"
                    android:textColor="@color/titoliLayout"
                    android:textSize="@dimen/dimensioneTitoli"

                    />

                <android.support.v7.widget.RecyclerView

                    android:id="@+id/list"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="8dp"
                    android:nestedScrollingEnabled="true"
                    >


                </android.support.v7.widget.RecyclerView>


                <!-- scroll orizzontale delle immagini e del testo (NO TITOLO TOP 10 RICETTE)-->


            </LinearLayout>

            <LinearLayout

                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="@dimen/margineTraLayout"
                android:layout_marginLeft="@dimen/margineLateraleLayout"
                android:layout_marginRight="@dimen/margineLateraleLayout"
                android:background="@color/body"
                android:orientation="vertical"


                ><TextView

                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="16dp"
                    android:layout_marginLeft="8dp"
                    android:text="Preparazioni"
                    android:textColor="@color/sottoTitoli"
                    android:textSize="@dimen/dimensioneSottoTitoli"

                    />


在我关闭我的所有标签后

我在与同样的运气作斗争?我在与同样的运气作斗争?