Browse Source

List fragments: Add empty list as a child of SwipeRefreshLayout, not outside it.

This allows swiping to refresh on empty folders.

Fixes #10973

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Álvaro Brey 2 years ago
parent
commit
9364da5077
1 changed files with 10 additions and 9 deletions
  1. 10 9
      app/src/main/res/layout/list_fragment.xml

+ 10 - 9
app/src/main/res/layout/list_fragment.xml

@@ -29,15 +29,16 @@
         android:footerDividersEnabled="false"
         android:visibility="visible"
         app:layout_behavior="@string/appbar_scrolling_view_behavior">
-
-        <com.owncloud.android.ui.EmptyRecyclerView
-            android:id="@+id/list_root"
+        <FrameLayout
             android:layout_width="match_parent"
-            android:layout_height="match_parent" />
+            android:layout_height="match_parent">
+            <com.owncloud.android.ui.EmptyRecyclerView
+                android:id="@+id/list_root"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent" />
+            <include
+                android:id="@+id/empty_list"
+                layout="@layout/empty_list" />
+        </FrameLayout>
     </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
-
-    <include
-        android:id="@+id/empty_list"
-        layout="@layout/empty_list" />
-
 </RelativeLayout>