I enabled "pull to refresh" to my project using the SwipeRefreshLayout
.
When I move down, appear the loading indicator (material design style). I know, it must so work, but I want to disable this function, and start refreshing by click some button and use SwipeRefreshLayout
loading indicator.
How I can to do this?
You can also use 'Find in page' option for automatic searching by tapping on 3 dots on upper right corner of the screen . Tap on Find in page for automatic searching. In “The pull-to-refresh effect Android” , click on Disable button. Select 'Always' and tap on RELAUNCH NOW button to disable pull-to-refresh feature.
Add the SwipeRefreshLayout Widget To add the swipe to refresh widget to an existing app, add SwipeRefreshLayout as the parent of a single ListView or GridView . Remember that SwipeRefreshLayout only supports a single ListView or GridView child. You can also use the SwipeRefreshLayout widget with a ListFragment .
From the documentation:
If an activity wishes to show just the progress animation, it should call setRefreshing(true). To disable the gesture and progress animation, call setEnabled(false) on the view.
So to show the animation:
swiperefreshLayout.setEnabled(true); swiperefreshLayout.setRefreshing(true);
And to hide the animation:
swiperefreshLayout.setRefreshing(false); swiperefreshLayout.setEnabled(false);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With