Im getting problem with swipe to refresh layout, if swipe for refresh my layout on that time if I pressed back button it close all activity's and fragments.. i checked log but there no Application Terminated error...
You can use isRefreshing()
Whether the
SwipeRefreshWidget
is actively showing refresh progress.
Sample code
@Override
public void onBackPressed() {
if (swipeRefreshLayout.isRefreshing()){
// swipeRefreshLayout is Refreshing
}else {
// swipeRefreshLayout is not Refreshing call super.onBackPressed();
super.onBackPressed();
}
}