TLDR:这是我的错误报告:http://goo.gl/UgBFW2
使用 SwipeRefreshLayout
如果我按回键并触发 getSupportFragmentManager().popBackstack()
, super.onBackPressed()
或 fragmentTransaction.replace()
就在适配器触发 View 刷新时,两个 fragment 重叠(显示问题的视频可以在顶部链接中找到)。
我尝试了几件事,添加背景不是解决方案,因为列表 fragment 在前景中,可点击的是前一个 fragment 。
有没有人找到解决办法?
Replacing Fragment does not work properly while swipeRefresh is running
最佳答案
将其添加到包含滑动的 fragment
@Override
public void onPause() {
super.onPause();
if (swipeRefreshLayout!=null) {
swipeRefreshLayout.setRefreshing(false);
swipeRefreshLayout.destroyDrawingCache();
swipeRefreshLayout.clearAnimation();
}
}
关于android - SwipeRefreshLayout 刷新与 fragmentTransactions 冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29773876/