Skip to content

Commit ecebb2c

Browse files
committed
1、Update to 1.0.3
2、fix(fragmentation_core): YoKeyword#1139 3、fix(fragmentation_swipeback):YoKeyword#1159 4、update demo_wechat ,add login and splash fragments 5、CI use github actions
1 parent 0394930 commit ecebb2c

File tree

30 files changed

+381
-127
lines changed

30 files changed

+381
-127
lines changed

.github/workflows/release.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: RELEASE_CI
2+
3+
on:
4+
push:
5+
# Sequence of patterns matched against refs/tags
6+
tags:
7+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
8+
jobs:
9+
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: set up JDK 1.8
15+
uses: actions/setup-java@v1
16+
with:
17+
java-version: 1.8
18+
# 打包apk
19+
- name: Build with Gradle
20+
run: chmod +x gradlew &&./gradlew assembleRelease
21+
22+
23+
# 上传apk 到action,在右上角查看
24+
- name: Upload APK
25+
uses: actions/upload-artifact@v1
26+
with:
27+
name: app
28+
path: app/build/outputs/apk/release/fragmentation.apk
29+
30+
# apk 签名
31+
- name: Sign Apk
32+
id: sign
33+
uses: r0adkll/sign-android-release@v1
34+
with:
35+
releaseDirectory: app/build/outputs/apk/release/
36+
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
37+
alias: ${{ secrets.ALIAS }}
38+
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
39+
keyPassword: ${{ secrets.KEY_PASSWORD }}
40+
41+
- name: Create Release
42+
id: create_release
43+
uses: actions/[email protected]
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
with:
47+
tag_name: ${{ github.ref }}
48+
release_name: Release ${{ github.ref }}
49+
draft: false
50+
prerelease: false
51+
- name: Upload Release Asset
52+
id: upload-release-asset
53+
uses: actions/[email protected]
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
with:
57+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
58+
asset_path: ${{ steps.sign.outputs.signedReleaseFile }}
59+
asset_name: fragmentation.apk
60+
asset_content_type: application/zip

.travis.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
Support Androidx!
55

66
## Pre
7-
[master](https://github.com/YoKeyword/Fragmentation/blob/master/CHANGELOG.md)
7+
[master](https://github.com/JantHsueh/Fragmentation/blob/master/CHANGELOG.md)

README.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Fragmentation-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/5937)
2-
[![Build Status](https://travis-ci.org/YoKeyword/Fragmentation.svg?branch=master)](https://travis-ci.org/YoKeyword/Fragmentation)
3-
[![Download](https://api.bintray.com/packages/yokeyword/maven/Fragmentation/images/download.svg) ](https://bintray.com/yokeyword/maven/Fragmentation/_latestVersion)
2+
[![Build Status](https://github.com/JantHsueh/Fragmentation/workflows/RELEASE_CI/badge.svg?branch=androidx)](https://github.com/JantHsueh/Fragmentation/workflows/RELEASE_CI/badge.svg?branch=androidxn)
3+
[![Download](https://api.bintray.com/packages/jantxue/maven/Fragmentationx/images/download.svg) ](https://bintray.com/jantxue/maven/Fragmentationx/_latestVersion)
44
[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](https://www.apache.org/licenses/LICENSE-2.0)
55

6-
# PLEASE NOTE, THIS PROJECT IS NO LONGER BEING MAINTAINED
76
****
8-
### [中文版 README.md](https://github.com/YoKeyword/Fragmentation/blob/master/README_CN.md)
7+
### [中文版 README.md](https://github.com/JantHsueh/Fragmentation/blob/androidx/README_CN.md)
98

109
# FragmentationX
1110

@@ -18,7 +17,7 @@ It is designed for "Single Activity + Multi-Fragments" and "Multi-FragmentActivi
1817
## Demo
1918
The first demo shows the basic usage of the library. The second one shows the way to implement an app which is similar to Instagram. Complicated nested fragments' usage demo are also showed.
2019

21-
## [Download APK](https://www.pgyer.com/fragmentation)
20+
## [Download APK](https://github.com/JantHsueh/Fragmentation/releases)
2221

2322
<img src="/gif/demo1.gif" width="280px"/> <img src="/gif/demo2.gif" width="280px"/>
2423
 <img src="/gif/demo3.gif" width="280px"/>
@@ -37,34 +36,34 @@ The first demo shows the basic usage of the library. The second one shows the wa
3736

3837
**6. Easily manage Fragment transition animations**
3938

40-
**7. To simplify the communication between Fragment([EventBusActivityScope module](https://github.com/YoKeyword/Fragmentation/blob/master/eventbus_activity_scope/README.md))**
39+
**7. To simplify the communication between Fragment([EventBusActivityScope module](https://github.com/JantHsueh/Fragmentation/blob/master/eventbus_activity_scope/README.md))**
4140

42-
**8. Support SwipeBack to pop(Fragmentation_SwipeBack module [README](https://github.com/YoKeyword/Fragmentation/blob/master/fragmentation_swipeback/README.md))**
41+
**8. Support SwipeBack to pop(Fragmentation_SwipeBack module [README](https://github.com/JantHsueh/Fragmentation/blob/master/fragmentation_swipeback/README.md))**
4342

4443
<img src="/gif/stack.png" width="150px"/> <img src="/gif/log.png" width="300px"/>       <img src="/gif/SwipeBack.png" width="150px"/>
4544

4645
## How do I use Fragmentation?
47-
### Note: This is the use of androidx, if you are using the android.support, [click here `branch:master`](https://github.com/YoKeyword/Fragmentation/blob/master/README.md)
46+
### Note: This is the use of androidx, if you are using the android.support, [click here `branch:master`](https://github.com/JantHsueh/Fragmentation/blob/master/README.md)
4847
**1、build.gradle**
4948
````gradle
5049
// This is the use of androidx, if you are using the android.support: fragmentationx -> fragmentation
51-
implementation 'me.yokeyword:fragmentationx:1.0.2'
50+
implementation 'me.xuexuan:fragmentationx:1.0.3'
5251
5352
// If you don't want to extends SupportActivity/Fragment and would like to customize your own support, just rely on fragmentation-core
54-
// implementation 'me.yokeyword:fragmentationx-core:1.0.2'
53+
// implementation 'me.xuexuan:fragmentationx-core:1.0.3'
5554
5655
// To get SwipeBack feature, rely on both fragmentation & fragmentation-swipeback
57-
implementation 'me.yokeyword:fragmentationx:1.0.2'
56+
implementation 'me.xuexuan:fragmentationx:1.0.3'
5857
// Swipeback is based on fragmentation. Refer to SwipeBackActivity/Fragment for your Customized SupportActivity/Fragment
59-
implementation 'me.yokeyword:fragmentationx-swipeback:1.0.2'
58+
implementation 'me.xuexuan:fragmentationx-swipeback:1.0.3'
6059
6160
// To simplify the communication between Fragments.
6261
implementation 'me.yokeyword:eventbus-activity-scope:1.1.0'
6362
// Your EventBus's version
6463
implementation 'org.greenrobot:eventbus:{version}'
6564
````
6665

67-
**2. Activity `extends` SupportActivity or `implements` ISupportActivity:(refer to [MySupportActivity](https://github.com/YoKeyword/Fragmentation/blob/master/demo/src/main/java/me/yokeyword/sample/demo_flow/base/MySupportActivity.java))**
66+
**2. Activity `extends` SupportActivity or `implements` ISupportActivity:(refer to [MySupportActivity](https://github.com/JantHsueh/Fragmentation/blob/master/demo/src/main/java/me/yokeyword/sample/demo_flow/base/MySupportActivity.java))**
6867
````java
6968
// since v1.0.0, forced extends of SupportActivity is not required, you can use interface + delegate to implement your own SupportActivity
7069
public class MainActivity extends SupportActivity {
@@ -87,7 +86,7 @@ public class MainActivity extends SupportActivity {
8786
}
8887
````
8988

90-
**3. Fragment `extends` SupportFragment or `implements` ISupportFragment:(refer to [MySupportFragment](https://github.com/YoKeyword/Fragmentation/blob/master/demo/src/main/java/me/yokeyword/sample/demo_flow/base/MySupportFragment.java)):**
89+
**3. Fragment `extends` SupportFragment or `implements` ISupportFragment:(refer to [MySupportFragment](https://github.com/JantHsueh/Fragmentation/blob/master/demo/src/main/java/me/yokeyword/sample/demo_flow/base/MySupportFragment.java)):**
9190
````java
9291
// since v1.0.0, forced extends of SupportActivity is not required, you can use interface + delegate to implement your own SupportActivity
9392
public class HomeFragment extends SupportFragment {
@@ -100,7 +99,7 @@ public class HomeFragment extends SupportFragment {
10099
}
101100
````
102101

103-
## [WIKI](https://github.com/YoKeyword/Fragmentation/wiki) , [CHANGELOG](https://github.com/YoKeyword/Fragmentation/blob/master/CHANGELOG.md)
102+
## [WIKI](https://github.com/JantHsueh/Fragmentation/wiki) , [CHANGELOG](https://github.com/JantHsueh/Fragmentation/blob/master/CHANGELOG.md)
104103

105104
## LICENSE
106105
````

README_CN.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Fragmentation-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/5937)
2-
[![Build Status](https://travis-ci.org/YoKeyword/Fragmentation.svg?branch=master)](https://travis-ci.org/YoKeyword/Fragmentation)
3-
[![Download](https://api.bintray.com/packages/yokeyword/maven/Fragmentationx/images/download.svg) ](https://bintray.com/yokeyword/maven/Fragmentationx/_latestVersion)
2+
[![Build Status](https://github.com/JantHsueh/Fragmentation/workflows/RELEASE_CI/badge.svg?branch=androidx)](https://github.com/JantHsueh/Fragmentation/workflows/RELEASE_CI/badge.svg?branch=androidxn)
3+
[![Download](https://api.bintray.com/packages/jantxue/maven/Fragmentationx/images/download.svg) ](https://bintray.com/jantxue/maven/Fragmentationx/_latestVersion)
44
[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](https://www.apache.org/licenses/LICENSE-2.0)
55

6-
# 注意:该项目不再维护
7-
86

97
# FragmentationX
108
A powerful library that manage Fragment for Android!
@@ -24,8 +22,7 @@ A powerful library that manage Fragment for Android!
2422
# Demo演示:
2523
均为单Activity + 多Fragment,第一个为简单流式demo,第二个为仿微信交互的demo(全页面支持滑动退出),第三个为仿知乎交互的复杂嵌套demo
2624

27-
## [下载APK](https://www.pgyer.com/fragmentation)
28-
25+
## [下载APK](https://github.com/JantHsueh/Fragmentation/releases)
2926

3027
<img src="/gif/demo1.gif" width="280px"/> <img src="/gif/demo2.gif" width="280px"/>
3128
 <img src="/gif/demo3.gif" width="280px"/>
@@ -44,35 +41,35 @@ A powerful library that manage Fragment for Android!
4441

4542
6、**提供 Fragment转场动画 系列解决方案,动态改变动画**
4643

47-
7、**提供Activity作用域的EventBus辅助类,Fragment通信更简单、独立(需要使用[EventBusActivityScope库](https://github.com/YoKeyword/Fragmentation/blob/master/eventbus_activity_scope/README.md))**
44+
7、**提供Activity作用域的EventBus辅助类,Fragment通信更简单、独立(需要使用[EventBusActivityScope库](https://github.com/JantHsueh/Fragmentation/blob/master/eventbus_activity_scope/README.md))**
4845

49-
8、**支持SwipeBack滑动边缘退出(需要使用[Fragmentation_SwipeBack库](https://github.com/YoKeyword/Fragmentation/blob/master/fragmentation_swipeback/README.md))**
46+
8、**支持SwipeBack滑动边缘退出(需要使用[Fragmentation_SwipeBack库](https://github.com/JantHsueh/Fragmentation/blob/master/fragmentation_swipeback/README.md))**
5047

5148
<img src="/gif/stack.png" width="150px"/> <img src="/gif/log.png" width="300px"/>     <img src="/gif/SwipeBack.png" width="150px"/>
5249

5350
# 如何使用
54-
### 注意:以下为androidx的使用方式,如果使用的是android.support包,[点击这里`master`分支](https://github.com/YoKeyword/Fragmentation/blob/master/README_CN.md)
51+
### 注意:以下为androidx的使用方式,如果使用的是android.support包,[点击这里`master`分支](https://github.com/JantHsueh/Fragmentation/blob/master/README_CN.md)
5552
**1. 项目下app的build.gradle中依赖:**
5653

5754
````gradle
5855
// 以下为androidx的使用方式,如果使用的是android.support包,fragmentationx -> fragmentation 即可
59-
implementation 'me.yokeyword:fragmentationx:1.0.2'
56+
implementation 'me.xuexuan:fragmentationx:1.0.3'
6057
6158
// 如果不想继承SupportActivity/Fragment,自己定制Support,可仅依赖:
62-
// implementation 'me.yokeyword:fragmentationx-core:1.0.2'
59+
// implementation 'me.xuexuan:fragmentationx-core:1.0.3'
6360
6461
// 如果想使用SwipeBack 滑动边缘退出Fragment/Activity功能,完整的添加规则如下:
65-
implementation 'me.yokeyword:fragmentationx:1.0.2'
62+
implementation 'me.xuexuan:fragmentationx:1.0.3'
6663
// swipeback基于fragmentation, 如果是自定制SupportActivity/Fragment,则参照SwipeBackActivity/Fragment实现即可
67-
implementation 'me.yokeyword:fragmentationx-swipeback:1.0.2'
64+
implementation 'me.xuexuan:fragmentationx-swipeback:1.0.3'
6865
6966
// Activity作用域的EventBus,通信更安全
7067
implementation 'me.yokeyword:eventbus-activity-scope:1.1.0'
7168
// Your EventBus's version
7269
implementation 'org.greenrobot:eventbus:{version}'
7370
````
7471

75-
**2. Activity `extends` SupportActivity或者 `implements` ISupportActivity:(实现方式可参考[MySupportActivity](https://github.com/YoKeyword/Fragmentation/blob/master/demo/src/main/java/me/yokeyword/sample/demo_flow/base/MySupportActivity.java))**
72+
**2. Activity `extends` SupportActivity或者 `implements` ISupportActivity:(实现方式可参考[MySupportActivity](https://github.com/JantHsueh/Fragmentation/blob/master/demo/src/main/java/me/yokeyword/sample/demo_flow/base/MySupportActivity.java))**
7673
````java
7774
// v1.0.0开始,不强制继承SupportActivity,可使用接口+委托形式来实现自己的SupportActivity
7875
public class MainActivity extends SupportActivity {
@@ -95,7 +92,7 @@ public class MainActivity extends SupportActivity {
9592
}
9693
````
9794

98-
**3. Fragment `extends` SupportFragment或者 `implements` ISupportFragment:(实现方式可参考[MySupportFragment](https://github.com/YoKeyword/Fragmentation/blob/master/demo/src/main/java/me/yokeyword/sample/demo_flow/base/MySupportFragment.java)):**
95+
**3. Fragment `extends` SupportFragment或者 `implements` ISupportFragment:(实现方式可参考[MySupportFragment](https://github.com/JantHsueh/Fragmentation/blob/master/demo/src/main/java/me/yokeyword/sample/demo_flow/base/MySupportFragment.java)):**
9996
````java
10097
// v1.0.0开始,不强制继承SupportFragment,可使用接口+委托形式来实现自己的SupportFragment
10198
public class HomeFragment extends SupportFragment {
@@ -108,7 +105,7 @@ public class HomeFragment extends SupportFragment {
108105
}
109106
````
110107

111-
## [进一步使用、ChangeLog,查看wiki](https://github.com/YoKeyword/Fragmentation/wiki)
108+
## [进一步使用、ChangeLog,查看wiki](https://github.com/JantHsueh/Fragmentation/wiki)
112109

113110
## LICENSE
114111
````

build.gradle

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ buildscript {
66
google()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.2.1'
10-
// classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
9+
classpath 'com.android.tools.build:gradle:3.5.2'
10+
// classpath 'com.novoda:bintray-release:0.9.2'
1111
}
1212
}
1313

@@ -28,4 +28,12 @@ ext {
2828
targetSdkVersion = compileSdkVersion
2929

3030
appCompatVersion = "1.1.0-alpha01"
31+
32+
// userOrg = "jantxue"
33+
// groupId = "me.xuexuan"
34+
// publishVersion = "1.0.3"
35+
// desc = "A powerful library that manage Fragment for Android"
36+
// website = "https://github.com/JantHsueh/Fragmentation"
37+
// licences = ['Apache-2.0']
38+
3139
}

demo/build.gradle

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,16 @@ android {
1414
compileSdkVersion rootProject.compileSdkVersion
1515

1616
defaultConfig {
17-
applicationId "me.yokeyword.sample"
17+
applicationId "me.xuexuan.fragmentation"
1818
minSdkVersion rootProject.minSdkVersion
1919
targetSdkVersion rootProject.targetSdkVersion
2020
versionCode 1
2121
versionName gitLatestTag()
2222
}
2323

24-
signingConfigs {
25-
releaseConfig {
26-
storeFile file("./fragmentation.jks")
27-
storePassword System.getenv("KEYSTORE_PASS")
28-
keyAlias System.getenv("ALIAS_NAME")
29-
keyPassword System.getenv("ALIAS_PASS")
30-
}
31-
}
32-
3324
buildTypes {
3425
release {
3526
minifyEnabled false
36-
37-
signingConfig signingConfigs.releaseConfig
38-
3927
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
4028
}
4129
}

demo/fragmentation.jks.enc

-2.14 KB
Binary file not shown.

demo/src/main/java/me/yokeyword/sample/demo_wechat/MainActivity.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
package me.yokeyword.sample.demo_wechat;
22

33
import android.os.Bundle;
4+
45
import androidx.annotation.Nullable;
56

67
import me.yokeyword.fragmentation.SupportActivity;
78
import me.yokeyword.fragmentation.anim.DefaultHorizontalAnimator;
89
import me.yokeyword.fragmentation.anim.FragmentAnimator;
910
import me.yokeyword.sample.R;
11+
import me.yokeyword.sample.demo_wechat.ui.fragment.LoginFragment;
1012
import me.yokeyword.sample.demo_wechat.ui.fragment.MainFragment;
13+
import me.yokeyword.sample.demo_wechat.ui.fragment.SplashFragment;
1114

1215
/**
1316
* 仿微信交互方式Demo
1417
* Created by YoKeyword on 16/6/30.
18+
* Modify by xuexuan on 2020年1月16日16:37:10
19+
* 修改后,加入SplashFragment、LoginFragment。这样的跳转关系和内存重启后的判断很关键,如果处理不当,容易出现崩溃
20+
*
1521
*/
1622
public class MainActivity extends SupportActivity {
1723

@@ -20,8 +26,11 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
2026
super.onCreate(savedInstanceState);
2127
setContentView(R.layout.wechat_activity_main);
2228

23-
if (findFragment(MainFragment.class) == null) {
24-
loadRootFragment(R.id.fl_container, MainFragment.newInstance());
29+
//这里需要如下判断,否则可能出现这个错误https://xuexuan.blog.csdn.net/article/details/103733622
30+
if (findFragment(MainFragment.class) == null
31+
&& findFragment(LoginFragment.class) == null
32+
&& findFragment(SplashFragment.class) == null) {
33+
loadRootFragment(R.id.fl_container, SplashFragment.newInstance());
2534
}
2635
}
2736

0 commit comments

Comments
 (0)