Skip to content

Commit

Permalink
Merge pull request #903 from YoKeyword/dev
Browse files Browse the repository at this point in the history
v1.3.5
  • Loading branch information
YoKeyword authored Jun 18, 2018
2 parents cef5447 + 2f6d92d commit 018bd92
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.4'
compile 'me.yokeyword:fragmentation:1.3.5'
// 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.4'
// compile 'me.yokeyword:fragmentation-core:1.3.5'
// To get SwipeBack feature, rely on both fragmentation & fragmentation-swipeback
compile 'me.yokeyword:fragmentation:1.3.4'
compile 'me.yokeyword:fragmentation:1.3.5'
// Swipeback is based on fragmentation. Refer to SwipeBackActivity/Fragment for your Customized SupportActivity/Fragment
compile 'me.yokeyword:fragmentation-swipeback:1.3.4'
compile 'me.yokeyword:fragmentation-swipeback:1.3.5'
// To simplify the communication between Fragments.
compile 'me.yokeyword:eventbus-activity-scope:1.1.0'
Expand Down
8 changes: 4 additions & 4 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.4'
compile 'me.yokeyword:fragmentation:1.3.5'
// 如果不想继承SupportActivity/Fragment,自己定制Support,可仅依赖:
// compile 'me.yokeyword:fragmentation-core:1.3.4'
// compile 'me.yokeyword:fragmentation-core:1.3.5'
// 如果想使用SwipeBack 滑动边缘退出Fragment/Activity功能,完整的添加规则如下:
compile 'me.yokeyword:fragmentation:1.3.4'
compile 'me.yokeyword:fragmentation:1.3.5'
// swipeback基于fragmentation, 如果是自定制SupportActivity/Fragment,则参照SwipeBackActivity/Fragment实现即可
compile 'me.yokeyword:fragmentation-swipeback:1.3.4'
compile 'me.yokeyword:fragmentation-swipeback:1.3.5'
// Activity作用域的EventBus,更安全,可有效避免after onSavenInstanceState()异常
compile 'me.yokeyword:eventbus-activity-scope:1.1.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ public abstract ExtraTransaction setCustomAnimations(@AnimatorRes @AnimRes int t

public abstract void startDontHideSelf(ISupportFragment toFragment);

public abstract void startDontHideSelf(ISupportFragment toFragment, @ISupportFragment.LaunchMode int launchMode);

public abstract void start(ISupportFragment toFragment, @ISupportFragment.LaunchMode int launchMode);

public abstract void startForResult(ISupportFragment toFragment, int requestCode);
Expand Down Expand Up @@ -241,6 +243,12 @@ public void startDontHideSelf(ISupportFragment toFragment) {
mTransactionDelegate.dispatchStartTransaction(getFragmentManager(), mSupportF, toFragment, 0, ISupportFragment.STANDARD, TransactionDelegate.TYPE_ADD_WITHOUT_HIDE);
}

@Override
public void startDontHideSelf(ISupportFragment toFragment, @ISupportFragment.LaunchMode int launchMode) {
toFragment.getSupportDelegate().mTransactionRecord = mRecord;
mTransactionDelegate.dispatchStartTransaction(getFragmentManager(), mSupportF, toFragment, 0, launchMode, TransactionDelegate.TYPE_ADD_WITHOUT_HIDE);
}

@Override
public void start(ISupportFragment toFragment, @ISupportFragment.LaunchMode int launchMode) {
toFragment.getSupportDelegate().mTransactionRecord = mRecord;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|| (mFragment.getTag() != null && mFragment.getTag().startsWith("android:switcher:"))
|| (mReplaceMode && !mFirstCreateView)) {
notifyEnterAnimEnd();
} else if (mCustomEnterAnim != Integer.MIN_VALUE) {
fixAnimationListener(mCustomEnterAnim == 0 ?
mAnimHelper.getNoneAnim() : AnimationUtils.loadAnimation(_mActivity, mCustomEnterAnim));
}

if (mFirstCreateView) {
Expand Down
4 changes: 2 additions & 2 deletions fragmentation_swipeback/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Activity内Fragment数大于1时,滑动返回的是Fragment,否则滑动返
1、项目下app的build.gradle中依赖:
````gradle
// appcompat v7包是必须的
compile 'me.yokeyword:fragmentation:1.3.4'
compile 'me.yokeyword:fragmentation-swipeback:1.3.4'
compile 'me.yokeyword:fragmentation:1.3.5'
compile 'me.yokeyword:fragmentation-swipeback:1.3.5'
````

2、如果Activity也需要支持SwipeBack,则继承SwipeBackActivity:
Expand Down

0 comments on commit 018bd92

Please sign in to comment.