Whenever the page scroll down pull to refresh automatically recalled. What to do?

43 Views Asked by At
//Swipe Refresh Layout:
        swipeRefreshLayout = (SwipeRefreshLayout)findViewById(R.id.swipe);
        swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {
                swipeRefreshLayout.setRefreshing(true);
                new Handler().postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        swipeRefreshLayout.setRefreshing(false);
                        webview.reload();
                    }
                },2000);
            }
        });

Basically I'm Converting a website to app. and Whenever I scroll down the page the pull to refreshed(swipe refresh) automatically activated means I can't scroll down, every time it refreshed.

I am expecting that it worked normally...

0

There are 0 best solutions below