У меня небольшая проблема с прокруткой на экране. Макет выглядит следующим образом:
<LinearLayout 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"
android:orientation="vertical">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/my_account_parent_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<!--- Views omitted --->
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<android.support.v7.widget.RecyclerView
android:id="@+id/my_account_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</LinearLayout>
Проблема в том, что recyclerview не может находиться в Scrollview/NestedScrollView, поэтому он находится вне прокрутки. Теперь мне нужны представления, завернутые в LinearLayout, который обернут вокруг NestedScrollView, для прокрутки вверх, когда пользователь прокручивает любое из представлений (RecyclerView и все остальные над ним). Несмотря на то, что вокруг других представлений есть прокрутка, они не понимают, что могут прокручивать экран, даже если у recyclerview есть контент за пределами экрана?
Спасибо