Ich habe eine Listenansicht mit horizontalem Bildlauf mithilfe von RecyclerView in Bildlaufansicht implementiert. Ich möchte das Element aktualisieren, wenn der Benutzer zum Ende der Listenansicht wischt (das Element wird nach der Aktualisierung hinzugefügt). Der folgende Code ist die Layout-Implementierung.RecyclerView innerhalb von SwipeRefreshLayout wird nicht angezeigt
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v4.widget.SwipeRefreshLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layoutManager="android.support.v7.widget.LinearLayoutManager">
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</ScrollView>
Bevor ich SwipeRefreshLayout hinzufügen, funktioniert alles einwandfrei (Artikel in RecyclerView gezeigt normal), aber nachdem ich SwipeRefreshLayout hinzufügen, wird RecyclerView gegangen (sowohl im Gerät und in der Vorschau in Android Studio)
Könnten Sie Abbildung heraus, wie man dieses Problem beheben kann. Danke im Voraus!!
SwipeRefreshLayout Mutter hinzufügen und Scroll-Ansicht – Pavya