How to disable "pull to refresh" action and use only indicator?
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);
You don't have to always enable and disable. Just disable once when the view is created and then use setRefreshing.