├── simple ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values-w820dp │ │ │ │ ├── ids.xml │ │ │ │ └── dimens.xml │ │ │ ├── anim │ │ │ │ ├── dialog_exit.xml │ │ │ │ ├── popup_anim_out.xml │ │ │ │ ├── out.xml │ │ │ │ ├── quit_out.xml │ │ │ │ ├── in.xml │ │ │ │ ├── next_in.xml │ │ │ │ ├── quit_in.xml │ │ │ │ ├── next_out.xml │ │ │ │ ├── dialog_in.xml │ │ │ │ ├── dialog_out.xml │ │ │ │ ├── popup_anim_in.xml │ │ │ │ └── dialog_anim.xml │ │ │ └── layout │ │ │ │ ├── activity_main.xml │ │ │ │ ├── fragment4.xml │ │ │ │ ├── fragment2.xml │ │ │ │ ├── fragment3.xml │ │ │ │ ├── fragment1.xml │ │ │ │ └── home_layout.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── mrwang │ │ │ └── simple │ │ │ ├── MainActivity.java │ │ │ ├── Fragment4.java │ │ │ ├── Fragment1.java │ │ │ ├── Fragment2.java │ │ │ ├── Fragment3.java │ │ │ └── HomeFragment.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── mrwang │ │ │ └── simple │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── mrwang │ │ └── simple │ │ └── ApplicationTest.java ├── build.gradle ├── proguard-rules.pro └── simple.iml ├── stacklibrary ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── ids.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── mrwang │ │ │ └── stacklibrary │ │ │ ├── CloseFragment.java │ │ │ ├── KeyCallBack.java │ │ │ ├── OnNewIntent.java │ │ │ ├── RootActivity.java │ │ │ ├── RootFragment.java │ │ │ ├── FragmentStack.java │ │ │ └── StackManager.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── mrwang │ │ │ └── stacklibrary │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── mrwang │ │ └── stacklibrary │ │ └── ApplicationTest.java ├── proguard-rules.pro ├── build.gradle └── stacklibrary.iml ├── settings.gradle ├── play.gif ├── .idea ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── vcs.xml ├── libraries │ ├── support_v4_25_1_1.xml │ ├── junit_4_12.xml │ ├── hamcrest_core_1_3.xml │ ├── support_annotations_25_1_1.xml │ ├── appcompat_v7_25_1_1.xml │ ├── support_compat_25_1_1.xml │ ├── support_core_ui_25_1_1.xml │ ├── support_fragment_25_1_1.xml │ ├── support_core_utils_25_1_1.xml │ ├── support_media_compat_25_1_1.xml │ ├── animated_vector_drawable_25_1_1.xml │ └── support_vector_drawable_25_1_1.xml ├── modules.xml ├── runConfigurations.xml ├── compiler.xml ├── gradle.xml └── misc.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── FragmentStack.iml ├── gradle.properties ├── gradlew.bat ├── README.md ├── gradlew └── LICENSE /simple/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /stacklibrary/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':simple', ':stacklibrary' 2 | -------------------------------------------------------------------------------- /play.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-wangyong/FragmentStack/HEAD/play.gif -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /simple/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | frameTest 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-wangyong/FragmentStack/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /stacklibrary/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | FragmentStackLibrary 3 | 4 | -------------------------------------------------------------------------------- /simple/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-wangyong/FragmentStack/HEAD/simple/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /simple/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-wangyong/FragmentStack/HEAD/simple/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /simple/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-wangyong/FragmentStack/HEAD/simple/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /simple/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-wangyong/FragmentStack/HEAD/simple/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /simple/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mr-wangyong/FragmentStack/HEAD/simple/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /stacklibrary/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | -------------------------------------------------------------------------------- /simple/src/main/res/values-w820dp/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /simple/src/main/res/anim/dialog_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /simple/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /simple/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Apr 22 18:56:38 CST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 7 | -------------------------------------------------------------------------------- /simple/src/main/res/anim/popup_anim_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /simple/src/main/res/anim/out.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /simple/src/main/res/anim/quit_out.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /simple/src/main/res/anim/in.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /simple/src/main/res/anim/next_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /simple/src/main/res/anim/quit_in.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /stacklibrary/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /simple/src/main/res/anim/next_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /stacklibrary/src/main/java/com/mrwang/stacklibrary/CloseFragment.java: -------------------------------------------------------------------------------- 1 | package com.mrwang.stacklibrary; 2 | 3 | /** 4 | * close this fragment 5 | * User: chengwangyong(cwy545177162@163.com) 6 | * Date: 2015-12-06 7 | * Time: 19:39 8 | */ 9 | public interface CloseFragment { 10 | void close(RootFragment fragment); 11 | 12 | void show(RootFragment fragment); 13 | } 14 | -------------------------------------------------------------------------------- /stacklibrary/src/main/java/com/mrwang/stacklibrary/KeyCallBack.java: -------------------------------------------------------------------------------- 1 | package com.mrwang.stacklibrary; 2 | 3 | import android.view.KeyEvent; 4 | 5 | /** 6 | * Intercept key event callback 7 | * User: chengwangyong(cwy545177162@163.com) 8 | * Date: 2015-10-14 9 | * Time: 21:41 10 | */ 11 | public interface KeyCallBack { 12 | boolean onKeyDown(int keyCode, KeyEvent event); 13 | } 14 | -------------------------------------------------------------------------------- /simple/src/main/res/anim/dialog_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | -------------------------------------------------------------------------------- /simple/src/main/res/anim/dialog_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | -------------------------------------------------------------------------------- /simple/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /simple/src/test/java/com/mrwang/simple/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.mrwang.simple; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /stacklibrary/src/test/java/com/mrwang/stacklibrary/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.mrwang.stacklibrary; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /.idea/libraries/support_v4_25_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /simple/src/androidTest/java/com/mrwang/simple/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.mrwang.simple; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /simple/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /stacklibrary/src/main/java/com/mrwang/stacklibrary/OnNewIntent.java: -------------------------------------------------------------------------------- 1 | package com.mrwang.stacklibrary; 2 | 3 | /** 4 | * In the SingleTop mode, if the current task stack has, then call the callback fragment 5 | *

6 | * User: chengwangyong(cwy545177162@163.com) 7 | * Date: 2015-12-28 8 | * Time: 23:41 9 | */ 10 | public interface OnNewIntent { 11 | /** 12 | * SingleTop mode,this fragment not be Re create 13 | */ 14 | void onNewIntent(); 15 | } 16 | -------------------------------------------------------------------------------- /stacklibrary/src/androidTest/java/com/mrwang/stacklibrary/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.mrwang.stacklibrary; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /.idea/libraries/junit_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | 19 | # Local configuration file (sdk path, etc) 20 | local.properties 21 | 22 | # Proguard folder generated by Eclipse 23 | proguard/ 24 | 25 | # Log Files 26 | *.log 27 | 28 | # Android Studio Navigation editor temp files 29 | .navigation/ 30 | 31 | # Android Studio captures folder 32 | captures/ 33 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /simple/src/main/res/anim/popup_anim_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/hamcrest_core_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /simple/src/main/res/anim/dialog_anim.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 18 | -------------------------------------------------------------------------------- /.idea/libraries/support_annotations_25_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/appcompat_v7_25_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/support_compat_25_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/support_core_ui_25_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/support_fragment_25_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/support_core_utils_25_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/support_media_compat_25_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/animated_vector_drawable_25_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/support_vector_drawable_25_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /simple/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /simple/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.2" 6 | 7 | defaultConfig { 8 | applicationId "com.mrwang.simple" 9 | minSdkVersion 15 10 | targetSdkVersion 25 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(include: ['*.jar'], dir: 'libs') 24 | testCompile 'junit:junit:4.12' 25 | compile 'com.android.support:appcompat-v7:25.1.1' 26 | } 27 | -------------------------------------------------------------------------------- /simple/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\workspace\adt-bundle-windows-x86_64-20140702\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /stacklibrary/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\workspace\adt-bundle-windows-x86_64-20140702\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | -------------------------------------------------------------------------------- /simple/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 20 | -------------------------------------------------------------------------------- /stacklibrary/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'com.github.dcendents.android-maven' 3 | // JitPack Maven 4 | // Your Group 5 | group='com.github.mrwang' 6 | 7 | android { 8 | compileSdkVersion 25 9 | buildToolsVersion "25.0.2" 10 | 11 | defaultConfig { 12 | minSdkVersion 15 13 | targetSdkVersion 25 14 | versionCode 1 15 | versionName "1.0" 16 | } 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | } 24 | 25 | dependencies { 26 | compile fileTree(dir: 'libs', include: ['*.jar']) 27 | testCompile 'junit:junit:4.12' 28 | compile 'com.android.support:appcompat-v7:25.1.1' 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /simple/src/main/res/layout/fragment4.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 13 | 14 |