SwipeRefreshLayout刷新与fragmentTransactions的冲突

Cri*_*ten 8 android android-fragments

TLDR:这是我的错误报告:http://goo.gl/UgBFW2

使用SwipeRefreshLayout如果我按回到触发或者是getSupportFragmentManager().popBackstack(),super.onBackPressed()fragmentTransaction.replace()当适配器触发意见刷新,这两个片段重叠(显示了问题的视频可以在顶部链接中找到)的权利.

我尝试了几件事情并且添加背景不是解决方案,因为列表片段在前台并且可点击的是前一片段.

有没有人找到解决方案?

在swipeRefresh运行时,替换Fragment无法正常工作

小智 5

将其添加到包含滑动的片段

@Override
public void onPause() {
    super.onPause();
    if (swipeRefreshLayout!=null) {
        swipeRefreshLayout.setRefreshing(false);
        swipeRefreshLayout.destroyDrawingCache();
        swipeRefreshLayout.clearAnimation();
    }
}
Run Code Online (Sandbox Code Playgroud)


Mic*_*tes 3

这是一个错误。谷歌将来可能会修复它。

Android 问题 78062