diff --git a/README.md b/README.md index aae6518e..d0c9698a 100755 --- a/README.md +++ b/README.md @@ -46,15 +46,15 @@ The first demo shows the basic usage of the library. The second one shows the wa **1、build.gradle** ````gradle // appcompat-v7 is required -compile 'me.yokeyword:fragmentation:1.3.2' +compile 'me.yokeyword:fragmentation:1.3.3' // If you don't want to extends SupportActivity/Fragment and would like to customize your own support, just rely on fragmentation-core -// compile 'me.yokeyword:fragmentation-core:1.3.2' +// compile 'me.yokeyword:fragmentation-core:1.3.3' // To get SwipeBack feature, rely on both fragmentation & fragmentation-swipeback -compile 'me.yokeyword:fragmentation:1.3.2' +compile 'me.yokeyword:fragmentation:1.3.3' // Swipeback is based on fragmentation. Refer to SwipeBackActivity/Fragment for your Customized SupportActivity/Fragment -compile 'me.yokeyword:fragmentation-swipeback:1.3.2' +compile 'me.yokeyword:fragmentation-swipeback:1.3.3' // To simplify the communication between Fragments. compile 'me.yokeyword:eventbus-activity-scope:1.1.0' diff --git a/README_CN.md b/README_CN.md index 0a8806a3..e982ee28 100644 --- a/README_CN.md +++ b/README_CN.md @@ -52,15 +52,15 @@ A powerful library that manage Fragment for Android! **1. 项目下app的build.gradle中依赖:** ````gradle // appcompat-v7包是必须的 -compile 'me.yokeyword:fragmentation:1.3.2' +compile 'me.yokeyword:fragmentation:1.3.3' // 如果不想继承SupportActivity/Fragment,自己定制Support,可仅依赖: -// compile 'me.yokeyword:fragmentation-core:1.3.2' +// compile 'me.yokeyword:fragmentation-core:1.3.3' // 如果想使用SwipeBack 滑动边缘退出Fragment/Activity功能,完整的添加规则如下: -compile 'me.yokeyword:fragmentation:1.3.2' +compile 'me.yokeyword:fragmentation:1.3.3' // swipeback基于fragmentation, 如果是自定制SupportActivity/Fragment,则参照SwipeBackActivity/Fragment实现即可 -compile 'me.yokeyword:fragmentation-swipeback:1.3.2' +compile 'me.yokeyword:fragmentation-swipeback:1.3.3' // Activity作用域的EventBus,更安全,可有效避免after onSavenInstanceState()异常 compile 'me.yokeyword:eventbus-activity-scope:1.1.0' diff --git a/fragmentation_core/src/main/java/me/yokeyword/fragmentation/SupportHelper.java b/fragmentation_core/src/main/java/me/yokeyword/fragmentation/SupportHelper.java index 1bb269fb..7d19821b 100644 --- a/fragmentation_core/src/main/java/me/yokeyword/fragmentation/SupportHelper.java +++ b/fragmentation_core/src/main/java/me/yokeyword/fragmentation/SupportHelper.java @@ -245,8 +245,8 @@ static List getWillPopFragments(FragmentManager fm, String targetTag, for (int i = size - 1; i >= startIndex; i--) { Fragment fragment = fragmentList.get(i); - if (fragment != null) { - willPopFragments.add(fragmentList.get(i)); + if (fragment != null && fragment.getView() != null) { + willPopFragments.add(fragment); } } return willPopFragments; diff --git a/fragmentation_swipeback/README.md b/fragmentation_swipeback/README.md index 2103bc61..3f188a7b 100644 --- a/fragmentation_swipeback/README.md +++ b/fragmentation_swipeback/README.md @@ -10,8 +10,8 @@ Activity内Fragment数大于1时,滑动返回的是Fragment,否则滑动返 1、项目下app的build.gradle中依赖: ````gradle // appcompat v7包是必须的 -compile 'me.yokeyword:fragmentation:1.3.2' -compile 'me.yokeyword:fragmentation-swipeback:1.3.2' +compile 'me.yokeyword:fragmentation:1.3.3' +compile 'me.yokeyword:fragmentation-swipeback:1.3.3' ```` 2、如果Activity也需要支持SwipeBack,则继承SwipeBackActivity: