Closed hyukchan closed 9 years ago
Maybe there is a little flaw in the method checkCanScroolDown
.
fixed this by passing the child directly.
made this small method inside pullrefreshlayout.java:
View deChild;
public void setDeChild(View deChild){
this.deChild=deChild;
}
Then inside onInterceptTouchEvent make this small adjustment:
public boolean onInterceptTouchEvent(MotionEvent ev) {
boolean deFlag = false;
if(deChild!=null) {
deFlag = ViewCompat.canScrollVertically(deChild, -1);
}
if (!isEnabled() || canChildScrollUp() || deFlag || mRefreshing) {
return false;
}
....
Inside your main activity, call setDeChild after you initialize your pullrefresh layout..
final PullRefreshLayout layout = (PullRefreshLayout) findViewById(R.id.swipeRefreshLayout);
layout.setDeChild(listView);
Thanks :) :+1: , after make this changes it's work now
Ok thanks for your solution :+1:
Thanks for your solution
@seah0rses This works. Thank you so much!
Hi, I'm encountering a problem when I have a ScrollView inside your PullRefreshLayout. When I scroll to the end of the ScrollView and I want to scroll back to the top, the scroll is on PullRefreshLayout and not on the ScrollView. So I can't scroll back when I go to the end of the ScrollView !
I'm not sure if it's very clear :/