For #10241 - Use VerticalSwipeRefreshLayout for pull to refresh

And so resolve many of the issues found in the platform's SwipeRefreshLayout.
pull/72/head
Mugurell 4 years ago
parent 022bc5f5ff
commit 33fc520468

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

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

Loading…
Cancel
Save