I have the following layout
If you have layout like this:
...
You need to create your own class and override the function in this way:
class SwipeRefreshLayoutCustom extends SwipeRefreshLayout {
public SwipeRefreshLayoutCustom(Context context, AttributeSet attributes) {
super(context, attributes)
}
@override
boolean canChildScrollUp() {
return your_scroll_view_id.scrollY != 0
}
}