[fenix] For https://github.com/mozilla-mobile/fenix/issues/10241 - Use VerticalSwipeRefreshLayout for pull to refresh

And so resolve many of the issues found in the platform's SwipeRefreshLayout.
pull/600/head
Mugurell 4 years ago
parent 92c7869749
commit c21a0dad3e

@ -658,6 +658,7 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
}
}
view.swipeRefresh.isEnabled = FeatureFlags.pullToRefreshEnabled
@Suppress("ConstantConditionIf")
if (FeatureFlags.pullToRefreshEnabled) {
val primaryTextColor =
@ -673,9 +674,6 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
owner = this,
view = view
)
} else {
// Disable pull to refresh
view.swipeRefresh.setOnChildScrollUpCallback { _, _ -> true }
}
webchannelIntegration.set(

@ -22,7 +22,7 @@
app:layout_constraintTop_toTopOf="parent"
tools:context="browser.BrowserFragment">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
<mozilla.components.ui.widgets.VerticalSwipeRefreshLayout
android:id="@+id/swipeRefresh"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -34,7 +34,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</mozilla.components.ui.widgets.VerticalSwipeRefreshLayout>
<ViewStub
android:id="@+id/stubFindInPage"

Loading…
Cancel
Save