ich NestedScrollView in Tab Layout verwende und wenn ich RecyclerView in NestedScrollView implementiert 2 Probleme auftreten:RecyclerView funktioniert nicht in NestedScrollView
- Toolbar versteckt sich nicht.
- RecyclerView in nicht reibungslos scrollen.
Hier ist mein Code:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:fillViewport="true"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:layout_width="match_parent"
android:background="#fff"
android:layout_height="wrap_content">
<android.support.v7.widget.RecyclerView
android:layout_below="@+id/toolbar"
android:id="@+id/recyclerView"
android:background="#fafafa"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true" />
<ProgressBar
android:id="@+id/progressBar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" />
</RelativeLayout>
</android.support.v4.widget.NestedScrollView>
Haben Sie in NestedScrollView Symbolleiste, weil nach Ihrem Code fügen Sie Ihre RecyclerView mit Android: layout_below = "@ + ID/Symbolleiste" –