0

I am trying to do some task NOT REFRESH when I am pulling a recyclerView, but the problem is it's showing the reload icon. I don't want to show that. I try to hide that in this way:

        swipeRefreshLayout.setColorSchemeColors(0,0,0,0);
    swipeRefreshLayout.setProgressBackgroundColor(android.R.color.transparent);
    swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
        @Override
        public void onRefresh() {
            // Refresh items
        }
    });

But it still showing a round circle with shadow. How can I detect pulling in a recylerview using Swiperefreshlayout (with out progress icon) or any other way?

pRaNaY
  • 24,642
  • 24
  • 96
  • 146
A J
  • 4,542
  • 5
  • 50
  • 80

2 Answers2

0

You just need to use swipeRefreshLayout.setRefreshing(false).

See this answer: https://stackoverflow.com/a/30328196/2949612

Use of void setRefreshing (boolean refreshing) :

Whether or not the view should show refresh progress.

Edits:

As per SwipeRefreshLayout doc:

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 you also need to add swiprefreshLayout.setEnabled( false ); after swipeRefreshLayout.setRefreshing(false) line.

Community
  • 1
  • 1
pRaNaY
  • 24,642
  • 24
  • 96
  • 146
0

You'll just need a line of code to do this

SwipeRefreshLayout.setRefreshing(false)
johnrao07
  • 6,690
  • 4
  • 32
  • 55