SwipeRefreshLayout
Closed this issue · 3 comments
rishabhsri20 commented
Can not implement swipe refresh layout with this view. We can not scroll to the top instead it starts refreshing everytime I try to scroll to top.
Deleted user commented
This happens on any View that you try and wrap a SwipeRefreshLayout
around. For it to work, you should consider extending this class and overriding its canChildScrollUp()
method and make it return true.
Slake07 commented
@insanepaul can you please give me example of that?
Deleted user commented
Sure.
public class MySwipeRefreshLayout extends SwipeRefreshLayout {
...
@Override
public boolean canChildScrollUp() {
return true;
}
...
}
Then use MySwipeRefreshLayout instead of SwipeRefreshLayout in your code.