Update:
This issue is now fixed in version 24.2.0 of the support library.
Original answer:
21 , , onTouchEvent() SwipeRefreshLayout onInterceptTouchEvent(). SwipeRefreshLayout , View. , , SwipeRefreshLayout 19.1.0 , 20.
https://code.google.com/p/android/issues/detail?id=87789
SwipeRefreshLayout onTouchEvent() onInterceptTouchEvent() , true:
public class FixedSwipeRefreshLayout extends SwipeRefreshLayout {
public FixedSwipeRefreshLayout(Context context) {
super(context);
}
public FixedSwipeRefreshLayout(Context context, AttributeSet attrs) {
super(context, attrs);
}
private boolean handleTouch = true;
@Override
public boolean onTouchEvent(MotionEvent ev) {
int action = MotionEventCompat.getActionMasked(ev);
switch (action) {
case MotionEvent.ACTION_DOWN:
handleTouch = false;
break;
default:
if (handleTouch) {
return super.onTouchEvent(ev);
}
handleTouch = onInterceptTouchEvent(ev);
switch (action) {
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
handleTouch = true;
break;
}
break;
}
return true;
}
}