M
M
Michael Kim2016-08-15 21:46:59
Java
Michael Kim, 2016-08-15 21:46:59

How to prevent accidental pull-to-refresh when scrolling down?

There is a SwipeRefreshLayout inside which there is a ScrollView, inside the ScrollView there is a RecyclerView. When scrolling the screen down, the pull-to-refresh gesture is triggered, even though I just scrolled the screen down. How to solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Gapchenko, 2016-08-15
@Marox

внутри ScrollView есть RecyclerView.
What for? RecyclerView / ListView / GridView are not designed to be put inside the ScrollView, because of this, all the reuse of child widgets flies to hell. Start by fixing this problem, and then take on the trouble with pull-to-refresh (although I think that it will disappear after fixing the first problem).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question