I use a SwipeRefreshLayout to reload the content of a listview .But the indicator get stuck each time of loading .Is there any way to fix this issue ?
The SwipeRefreshLayout will notify the listener each and every time the gesture is completed again; the listener is responsible for correctly determining when to actually initiate a refresh of its content. If the listener determines there should not be a refresh, it must call setRefreshing(false) to cancel any visual indication of a refresh. 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.
setRefreshing
Notify the widget that refresh state has changed. Do not call this when refresh is triggered by a swipe gesture.
setRefreshing(true) //to show the refresh indicator.
setRefreshing(false) to remove the refresh indicator.
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