├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimens.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
│ │ │ ├── layout
│ │ │ │ ├── fragment_child.xml
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── fragment_one.xml
│ │ │ │ └── fragment_two.xml
│ │ │ └── values-w820dp
│ │ │ │ └── dimens.xml
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── kr
│ │ │ └── pe
│ │ │ └── burt
│ │ │ └── android
│ │ │ └── lib
│ │ │ └── fragmentnavigationcontroller
│ │ │ └── app
│ │ │ ├── ChildFragment.java
│ │ │ ├── MainActivity.java
│ │ │ ├── FragmentTwo.java
│ │ │ └── FragmentOne.java
│ ├── test
│ │ └── java
│ │ │ └── kr
│ │ │ └── pe
│ │ │ └── burt
│ │ │ └── android
│ │ │ └── lib
│ │ │ └── fragmentnavigationcontroller
│ │ │ └── app
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── kr
│ │ └── pe
│ │ └── burt
│ │ └── android
│ │ └── lib
│ │ └── fragmentnavigationcontroller
│ │ └── app
│ │ └── ApplicationTest.java
├── proguard-rules.pro
├── build.gradle
└── app.iml
├── .idea
├── .name
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── vcs.xml
├── libraries
│ ├── junit_4_12.xml
│ ├── support_annotations_23_4_0.xml
│ ├── hamcrest_core_1_3.xml
│ ├── support_vector_drawable_23_4_0.xml
│ ├── animated_vector_drawable_23_4_0.xml
│ ├── appcompat_v7_23_4_0.xml
│ ├── fragmentanimations_0_1_0.xml
│ └── support_v4_23_4_0.xml
├── runConfigurations.xml
├── modules.xml
├── compiler.xml
├── gradle.xml
└── misc.xml
├── examples
└── TabBarExample
│ ├── .idea
│ ├── .name
│ ├── copyright
│ │ └── profiles_settings.xml
│ ├── encodings.xml
│ ├── modules.xml
│ ├── runConfigurations.xml
│ ├── compiler.xml
│ ├── gradle.xml
│ └── misc.xml
│ ├── app
│ ├── .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
│ │ │ │ │ └── dimens.xml
│ │ │ │ └── layout
│ │ │ │ │ ├── fragment_layout.xml
│ │ │ │ │ └── activity_main.xml
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ │ └── kr
│ │ │ │ └── pe
│ │ │ │ └── burt
│ │ │ │ └── android
│ │ │ │ └── tabbarexample
│ │ │ │ ├── FragmentFirst.java
│ │ │ │ ├── FragmentThird.java
│ │ │ │ ├── FragmentSecond.java
│ │ │ │ └── MainActivity.java
│ │ ├── test
│ │ │ └── java
│ │ │ │ └── kr
│ │ │ │ └── pe
│ │ │ │ └── burt
│ │ │ │ └── android
│ │ │ │ └── tabbarexample
│ │ │ │ └── ExampleUnitTest.java
│ │ └── androidTest
│ │ │ └── java
│ │ │ └── kr
│ │ │ └── pe
│ │ │ └── burt
│ │ │ └── android
│ │ │ └── tabbarexample
│ │ │ └── ApplicationTest.java
│ ├── proguard-rules.pro
│ └── build.gradle
│ ├── settings.gradle
│ ├── .gitignore
│ ├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradlew.bat
│ └── gradlew
├── fragmentnavigationcontroller
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ └── strings.xml
│ │ │ └── animator
│ │ │ │ ├── none.xml
│ │ │ │ ├── fade_in.xml
│ │ │ │ ├── fade_out.xml
│ │ │ │ ├── stack_left_in.xml
│ │ │ │ ├── stack_left_out.xml
│ │ │ │ ├── cube_right_in.xml
│ │ │ │ ├── cube_right_out.xml
│ │ │ │ ├── slide_fragment_horizontal_left_in.xml
│ │ │ │ ├── slide_fragment_horizontal_left_out.xml
│ │ │ │ ├── slide_fragment_horizontal_right_in.xml
│ │ │ │ ├── slide_fragment_horizontal_right_out.xml
│ │ │ │ ├── slide_fragment_vertical_left_in.xml
│ │ │ │ ├── slide_fragment_vertical_left_out.xml
│ │ │ │ ├── slide_fragment_vertical_right_in.xml
│ │ │ │ ├── slide_fragment_vertical_right_out.xml
│ │ │ │ ├── cube_left_in.xml
│ │ │ │ ├── cube_left_out.xml
│ │ │ │ ├── accordion_left_in.xml
│ │ │ │ ├── accordion_left_out.xml
│ │ │ │ ├── cube_vertical_left_in.xml
│ │ │ │ ├── cube_vertical_right_in.xml
│ │ │ │ ├── cube_vertical_right_out.xml
│ │ │ │ ├── cube_vertical_left_out.xml
│ │ │ │ ├── table_horizontal_left_in.xml
│ │ │ │ ├── table_vertical_left_in.xml
│ │ │ │ ├── table_vertical_left_out.xml
│ │ │ │ ├── table_vertical_right_in.xml
│ │ │ │ ├── table_vertical_right_out.xml
│ │ │ │ ├── accordion_right_in.xml
│ │ │ │ ├── accordion_right_out.xml
│ │ │ │ ├── accordion_vertical_left_in.xml
│ │ │ │ ├── accordion_vertical_left_out.xml
│ │ │ │ ├── table_horizontal_left_out.xml
│ │ │ │ ├── table_horizontal_right_in.xml
│ │ │ │ ├── table_horizontal_right_out.xml
│ │ │ │ ├── accordion_vertical_right_in.xml
│ │ │ │ ├── accordion_vertical_right_out.xml
│ │ │ │ ├── zoom_from_left_corner_left_in.xml
│ │ │ │ ├── zoom_from_left_corner_left_out.xml
│ │ │ │ ├── zoom_from_left_corner_right_in.xml
│ │ │ │ ├── zoom_from_left_corner_right_out.xml
│ │ │ │ ├── zoom_from_right_corner_left_in.xml
│ │ │ │ ├── zoom_from_right_corner_right_in.xml
│ │ │ │ ├── zoom_from_right_corner_left_out.xml
│ │ │ │ ├── zoom_from_right_corner_right_out.xml
│ │ │ │ ├── glide_fragment_horizontal_out.xml
│ │ │ │ ├── glide_fragment_horizontal_in.xml
│ │ │ │ ├── card_flip_horizontal_left_in.xml
│ │ │ │ ├── scalex_enter.xml
│ │ │ │ ├── scaley_enter.xml
│ │ │ │ ├── scalex_exit.xml
│ │ │ │ ├── scaley_exit.xml
│ │ │ │ ├── rotatedown_left_in.xml
│ │ │ │ ├── rotatedown_right_in.xml
│ │ │ │ ├── rotateleft_right_in.xml
│ │ │ │ ├── rotatedown_left_out.xml
│ │ │ │ ├── rotatedown_right_out.xml
│ │ │ │ ├── rotateleft_left_out.xml
│ │ │ │ ├── rotateleft_right_out.xml
│ │ │ │ ├── rotateright_left_in.xml
│ │ │ │ ├── rotateright_left_out.xml
│ │ │ │ ├── rotateright_right_in.xml
│ │ │ │ ├── rotateright_right_out.xml
│ │ │ │ ├── rotateleft_left_in.xml
│ │ │ │ ├── rotateup_left_out.xml
│ │ │ │ ├── rotateup_right_in.xml
│ │ │ │ ├── rotateup_right_out.xml
│ │ │ │ ├── rotateup_left_in.xml
│ │ │ │ ├── stack_right_in.xml
│ │ │ │ ├── scalexy_exit.xml
│ │ │ │ ├── stack_right_out.xml
│ │ │ │ ├── scalexy_enter.xml
│ │ │ │ ├── slide_fragment_out.xml
│ │ │ │ ├── slide_fragment_in.xml
│ │ │ │ ├── card_flip_vertical_right_out.xml
│ │ │ │ ├── card_flip_vertical_left_in.xml
│ │ │ │ ├── card_flip_horizontal_right_out.xml
│ │ │ │ ├── card_flip_vertical_left_out.xml
│ │ │ │ ├── card_flip_horizontal_left_out.xml
│ │ │ │ ├── card_flip_horizontal_right_in.xml
│ │ │ │ └── card_flip_vertical_right_in.xml
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── kr
│ │ │ └── pe
│ │ │ └── burt
│ │ │ └── android
│ │ │ └── lib
│ │ │ └── fragmentnavigationcontroller
│ │ │ ├── AndroidFragment.java
│ │ │ ├── FragmentNavigationController.java
│ │ │ ├── AndroidFragmentFrameLayout.java
│ │ │ └── PresentStyle.java
│ ├── test
│ │ └── java
│ │ │ └── kr
│ │ │ └── pe
│ │ │ └── burt
│ │ │ └── android
│ │ │ └── lib
│ │ │ └── fragmentnavigationcontroller
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── kr
│ │ └── pe
│ │ └── burt
│ │ └── android
│ │ └── lib
│ │ └── fragmentnavigationcontroller
│ │ └── ApplicationTest.java
├── proguard-rules.pro
├── build.gradle
└── fragmentnavigationcontroller.iml
├── settings.gradle
├── art
├── tabbar.gif
└── FragmentNavigationController.gif
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── gradle.properties
├── FragmentNavigationController.iml
├── LICENSE
├── gradlew.bat
├── gradlew
└── README.md
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | FragmentNavigationController
--------------------------------------------------------------------------------
/examples/TabBarExample/.idea/.name:
--------------------------------------------------------------------------------
1 | TabBarExample
--------------------------------------------------------------------------------
/examples/TabBarExample/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/examples/TabBarExample/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':fragmentnavigationcontroller'
2 |
--------------------------------------------------------------------------------
/art/tabbar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyfe79/FragmentNavigationController/HEAD/art/tabbar.gif
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | FragmentNavigationController
3 |
4 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyfe79/FragmentNavigationController/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/examples/TabBarExample/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/art/FragmentNavigationController.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyfe79/FragmentNavigationController/HEAD/art/FragmentNavigationController.gif
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | TabBarExample
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyfe79/FragmentNavigationController/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyfe79/FragmentNavigationController/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyfe79/FragmentNavigationController/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/TabBarExample/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | FragmentNavigationController
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyfe79/FragmentNavigationController/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyfe79/FragmentNavigationController/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/TabBarExample/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyfe79/FragmentNavigationController/HEAD/examples/TabBarExample/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyfe79/FragmentNavigationController/HEAD/examples/TabBarExample/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyfe79/FragmentNavigationController/HEAD/examples/TabBarExample/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyfe79/FragmentNavigationController/HEAD/examples/TabBarExample/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyfe79/FragmentNavigationController/HEAD/examples/TabBarExample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyfe79/FragmentNavigationController/HEAD/examples/TabBarExample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/TabBarExample/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
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-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_child.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/none.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/examples/TabBarExample/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
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-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/fade_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/fade_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/stack_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/stack_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/cube_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/cube_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/slide_fragment_horizontal_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/slide_fragment_horizontal_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/slide_fragment_horizontal_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/slide_fragment_horizontal_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/slide_fragment_vertical_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/slide_fragment_vertical_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/slide_fragment_vertical_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/slide_fragment_vertical_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/cube_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/cube_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/accordion_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/accordion_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/cube_vertical_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/cube_vertical_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/cube_vertical_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/cube_vertical_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/table_horizontal_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/table_vertical_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/table_vertical_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/table_vertical_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/table_vertical_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/accordion_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/accordion_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/accordion_vertical_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/accordion_vertical_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/table_horizontal_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/table_horizontal_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/table_horizontal_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/accordion_vertical_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/accordion_vertical_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/zoom_from_left_corner_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/zoom_from_left_corner_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/zoom_from_left_corner_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/zoom_from_left_corner_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/zoom_from_right_corner_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/zoom_from_right_corner_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/zoom_from_right_corner_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/zoom_from_right_corner_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/examples/TabBarExample/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/glide_fragment_horizontal_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/glide_fragment_horizontal_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/test/java/kr/pe/burt/android/tabbarexample/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.tabbarexample;
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 | }
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/test/java/kr/pe/burt/android/lib/fragmentnavigationcontroller/app/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.lib.fragmentnavigationcontroller.app;
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 | }
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/card_flip_horizontal_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/androidTest/java/kr/pe/burt/android/tabbarexample/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.tabbarexample;
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 | }
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/scalex_enter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
14 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/scaley_enter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/test/java/kr/pe/burt/android/lib/fragmentnavigationcontroller/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.lib.fragmentnavigationcontroller;
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 | }
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/scalex_exit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
14 |
15 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/scaley_exit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
14 |
15 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotatedown_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotatedown_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotateleft_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/junit_4_12.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/kr/pe/burt/android/lib/fragmentnavigationcontroller/app/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.lib.fragmentnavigationcontroller.app;
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 | }
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotatedown_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotatedown_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotateleft_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotateleft_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotateright_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotateright_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotateright_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotateright_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotateleft_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
15 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/androidTest/java/kr/pe/burt/android/lib/fragmentnavigationcontroller/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.lib.fragmentnavigationcontroller;
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 | }
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotateup_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
15 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotateup_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
15 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotateup_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
15 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/rotateup_left_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/support_annotations_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/hamcrest_core_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/examples/TabBarExample/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.1.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/examples/TabBarExample/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/stack_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
15 |
19 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/scalexy_exit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
14 |
18 |
19 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/stack_right_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
15 |
19 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/scalexy_enter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
15 |
16 |
20 |
21 |
--------------------------------------------------------------------------------
/.idea/libraries/support_vector_drawable_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/animated_vector_drawable_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/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 /Users/burt/Android/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 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/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 /Users/burt/Android/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 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/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 /Users/burt/Android/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 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/examples/TabBarExample/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.3"
6 |
7 | defaultConfig {
8 | applicationId "kr.pe.burt.android.lib.fragmentnavigationcontroller.app"
9 | minSdkVersion 17
10 | targetSdkVersion 23
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.labo.kaji:fragmentanimations:0.1.0'
26 | compile project(':fragmentnavigationcontroller')
27 | }
28 |
--------------------------------------------------------------------------------
/.idea/libraries/appcompat_v7_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/examples/TabBarExample/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/.idea/libraries/fragmentanimations_0_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 | >
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/examples/TabBarExample/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/slide_fragment_out.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/slide_fragment_in.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
--------------------------------------------------------------------------------
/.idea/libraries/support_v4_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/FragmentNavigationController.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/res/layout/fragment_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
28 |
29 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/card_flip_vertical_right_out.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
24 |
25 |
29 |
30 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/card_flip_vertical_left_in.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
25 |
26 |
30 |
31 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/card_flip_horizontal_right_out.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
24 |
25 |
29 |
30 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/card_flip_vertical_left_out.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
25 |
26 |
31 |
32 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Sungcheol Kim
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/card_flip_horizontal_left_out.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
24 |
25 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/card_flip_horizontal_right_in.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
25 |
26 |
31 |
32 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/res/animator/card_flip_vertical_right_in.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
26 |
27 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_one.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
23 |
24 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_two.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
23 |
24 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/java/kr/pe/burt/android/lib/fragmentnavigationcontroller/app/ChildFragment.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.lib.fragmentnavigationcontroller.app;
2 |
3 | import android.graphics.Color;
4 | import android.os.Bundle;
5 | import android.support.annotation.Nullable;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.TextView;
10 |
11 | import java.util.Random;
12 |
13 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.AndroidFragment;
14 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.FragmentNavigationController;
15 |
16 | /**
17 | * Created by burt on 2016. 6. 13..
18 | */
19 | public class ChildFragment extends AndroidFragment {
20 |
21 | @Nullable
22 | @Override
23 | protected View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
24 | return inflater.inflate(R.layout.fragment_child, container, false);
25 | }
26 |
27 | @Override
28 | public void onStart() {
29 | super.onStart();
30 | Random r = new Random();
31 | getContentView().setBackgroundColor(Color.rgb(r.nextInt(256), r.nextInt(256), r.nextInt(256)));
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'com.neenbedankt.android-apt'
3 |
4 | buildscript {
5 | repositories {
6 | mavenCentral()
7 | }
8 | dependencies {
9 | classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
10 | }
11 | }
12 |
13 | android {
14 | compileSdkVersion 23
15 | buildToolsVersion "23.0.3"
16 |
17 | defaultConfig {
18 | applicationId "kr.pe.burt.android.tabbarexample"
19 | minSdkVersion 17
20 | targetSdkVersion 23
21 | versionCode 1
22 | versionName "1.0"
23 | }
24 | buildTypes {
25 | release {
26 | minifyEnabled false
27 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
28 | }
29 | }
30 | }
31 |
32 | dependencies {
33 | compile fileTree(include: ['*.jar'], dir: 'libs')
34 | testCompile 'junit:junit:4.12'
35 | compile 'com.android.support:appcompat-v7:23.4.0'
36 | compile 'com.android.support:design:23.4.0'
37 | compile 'com.android.support:support-v13:23.4.0'
38 | compile 'com.jakewharton:butterknife:8.0.1'
39 | apt 'com.jakewharton:butterknife-compiler:8.0.1'
40 | compile 'kr.pe.burt.android.lib:fragmentnavigationcontroller:0.0.1'
41 | }
42 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'com.novoda.bintray-release'
3 |
4 | buildscript {
5 | repositories {
6 | jcenter()
7 | }
8 | dependencies {
9 | classpath 'com.novoda:bintray-release:0.3.4'
10 | }
11 | }
12 |
13 | publish {
14 | userOrg = 'skyfe79'
15 | groupId = 'kr.pe.burt.android.lib'
16 | artifactId = 'fragmentnavigationcontroller'
17 | publishVersion = '0.0.4'
18 | desc = 'FragmentNavigationController is a convenient utility class for navigating fragments on Android.'
19 | website = 'https://github.com/skyfe79/FragmentNavigationController'
20 | }
21 |
22 | android {
23 | compileSdkVersion 23
24 | buildToolsVersion "23.0.3"
25 |
26 | defaultConfig {
27 | minSdkVersion 13
28 | targetSdkVersion 23
29 | versionCode 4
30 | versionName "0.0.4"
31 | }
32 | buildTypes {
33 | release {
34 | minifyEnabled false
35 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
36 | }
37 | }
38 | compileOptions {
39 | targetCompatibility 1.7
40 | sourceCompatibility 1.7
41 | }
42 | }
43 |
44 | dependencies {
45 | compile fileTree(dir: 'libs', include: ['*.jar'])
46 | testCompile 'junit:junit:4.12'
47 | compile 'com.android.support:appcompat-v7:23.4.0'
48 | }
49 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/java/kr/pe/burt/android/tabbarexample/FragmentFirst.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.tabbarexample;
2 |
3 | import android.graphics.Color;
4 | import android.os.Bundle;
5 | import android.support.annotation.Nullable;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.TextView;
10 |
11 | import java.util.Random;
12 |
13 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.AndroidFragment;
14 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.FragmentNavigationController;
15 |
16 | /**
17 | * Created by burt on 2016. 6. 1..
18 | */
19 | public class FragmentFirst extends AndroidFragment {
20 |
21 | @Nullable
22 | @Override
23 | protected View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
24 | View v = inflater.inflate(R.layout.fragment_layout, container, false);
25 | TextView t = (TextView) v.findViewById(R.id.title);
26 | FragmentNavigationController navigationController = getNavigationController();
27 | if(navigationController != null) {
28 | t.setText("" + navigationController.getFragmentCount());
29 | }
30 | v.findViewById(R.id.next).setOnClickListener(new View.OnClickListener() {
31 | @Override
32 | public void onClick(View view) {
33 | FragmentNavigationController nv = getNavigationController();
34 | if(nv == null) return;
35 |
36 | Random r = new Random();
37 | nv.setPresentStyle(r.nextInt(39)+1); //exclude NONE present style
38 | nv.presentFragment(new FragmentFirst());
39 | }
40 | });
41 | return v;
42 | }
43 |
44 | @Override
45 | public void onStart() {
46 | super.onStart();
47 | Random r = new Random();
48 | getContentView().setBackgroundColor(Color.rgb(r.nextInt(256), r.nextInt(256), r.nextInt(256)));
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/java/kr/pe/burt/android/tabbarexample/FragmentThird.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.tabbarexample;
2 |
3 | import android.graphics.Color;
4 | import android.os.Bundle;
5 | import android.support.annotation.Nullable;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.TextView;
10 |
11 | import java.util.Random;
12 |
13 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.AndroidFragment;
14 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.FragmentNavigationController;
15 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.PresentStyle;
16 |
17 | /**
18 | * Created by burt on 2016. 6. 1..
19 | */
20 | public class FragmentThird extends AndroidFragment {
21 |
22 | @Nullable
23 | @Override
24 | protected View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
25 | View v = inflater.inflate(R.layout.fragment_layout, container, false);
26 | TextView t = (TextView) v.findViewById(R.id.title);
27 | FragmentNavigationController navigationController = getNavigationController();
28 | if(navigationController != null) {
29 | t.setText("" + navigationController.getFragmentCount());
30 | }
31 | v.findViewById(R.id.next).setOnClickListener(new View.OnClickListener() {
32 | @Override
33 | public void onClick(View view) {
34 | FragmentNavigationController nv = getNavigationController();
35 | if(nv == null) return;
36 | nv.setPresentStyle(PresentStyle.SLIDE_LEFT); //exclude NONE present style
37 | nv.presentFragment(new FragmentThird());
38 | }
39 | });
40 | return v;
41 | }
42 |
43 | @Override
44 | public void onStart() {
45 | super.onStart();
46 | Random r = new Random();
47 | getContentView().setBackgroundColor(Color.rgb(r.nextInt(256), r.nextInt(256), r.nextInt(256)));
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/java/kr/pe/burt/android/tabbarexample/FragmentSecond.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.tabbarexample;
2 |
3 | import android.graphics.Color;
4 | import android.os.Bundle;
5 | import android.support.annotation.Nullable;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.TextView;
10 |
11 | import java.util.Random;
12 |
13 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.AndroidFragment;
14 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.FragmentNavigationController;
15 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.PresentStyle;
16 |
17 | /**
18 | * Created by burt on 2016. 6. 1..
19 | */
20 | public class FragmentSecond extends AndroidFragment {
21 |
22 | @Nullable
23 | @Override
24 | protected View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
25 | View v = inflater.inflate(R.layout.fragment_layout, container, false);
26 | TextView t = (TextView) v.findViewById(R.id.title);
27 | FragmentNavigationController navigationController = getNavigationController();
28 | if(navigationController != null) {
29 | t.setText("" + navigationController.getFragmentCount());
30 | }
31 | v.findViewById(R.id.next).setOnClickListener(new View.OnClickListener() {
32 | @Override
33 | public void onClick(View view) {
34 | FragmentNavigationController nv = getNavigationController();
35 | if(nv == null) return;
36 | nv.setPresentStyle(PresentStyle.ACCORDION_LEFT); //exclude NONE present style
37 | nv.presentFragment(new FragmentSecond());
38 | }
39 | });
40 | return v;
41 | }
42 |
43 | @Override
44 | public void onStart() {
45 | super.onStart();
46 | Random r = new Random();
47 | getContentView().setBackgroundColor(Color.rgb(r.nextInt(256), r.nextInt(256), r.nextInt(256)));
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/java/kr/pe/burt/android/lib/fragmentnavigationcontroller/app/MainActivity.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.lib.fragmentnavigationcontroller.app;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.view.MotionEvent;
6 | import android.view.animation.AccelerateDecelerateInterpolator;
7 |
8 | import java.util.Random;
9 |
10 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.PresentStyle;
11 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.FragmentNavigationController;
12 |
13 | public class MainActivity extends AppCompatActivity {
14 |
15 |
16 | FragmentNavigationController navigationController;
17 |
18 | @Override
19 | protected void onCreate(Bundle savedInstanceState) {
20 | super.onCreate(savedInstanceState);
21 | setContentView(R.layout.activity_main);
22 |
23 | navigationController = FragmentNavigationController.navigationController(getFragmentManager(), R.id.fragmentContainer);
24 | navigationController.setPresentStyle(PresentStyle.ACCORDION_LEFT);
25 | navigationController.setInterpolator(new AccelerateDecelerateInterpolator());
26 |
27 | nextFragment();
28 | }
29 |
30 | @Override
31 | public boolean onTouchEvent(MotionEvent event) {
32 | if(event.getAction() == MotionEvent.ACTION_UP) {
33 | nextFragment();
34 | }
35 | return super.onTouchEvent(event);
36 | }
37 |
38 | private void nextFragment() {
39 |
40 | Random r = new Random();
41 | //navigationController.setPresentStyle(r.nextInt(39) + 1); //exclude NONE present style
42 | navigationController.setPresentStyle(PresentStyle.ACCORDION_LEFT);
43 | if(navigationController.getFragmentCount() % 2 == 0) {
44 | navigationController.presentFragment(new FragmentOne());
45 | } else {
46 | navigationController.presentFragment(new FragmentTwo());
47 | }
48 |
49 | }
50 |
51 | @Override
52 | public void onBackPressed() {
53 | if(navigationController.dismissFragment() == false) {
54 | super.onBackPressed();
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
22 |
23 |
27 |
28 |
29 |
30 |
33 |
34 |
39 |
40 |
45 |
46 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/examples/TabBarExample/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/examples/TabBarExample/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/app/src/main/java/kr/pe/burt/android/lib/fragmentnavigationcontroller/app/FragmentTwo.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.lib.fragmentnavigationcontroller.app;
2 |
3 | import android.graphics.Color;
4 | import android.os.Bundle;
5 | import android.support.annotation.Nullable;
6 | import android.util.Log;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.view.animation.AccelerateDecelerateInterpolator;
11 | import android.widget.TextView;
12 |
13 | import java.util.Random;
14 |
15 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.AndroidFragment;
16 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.FragmentNavigationController;
17 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.PresentStyle;
18 |
19 | /**
20 | * Created by burt on 2016. 5. 22..
21 | */
22 | public class FragmentTwo extends AndroidFragment {
23 |
24 | FragmentNavigationController childNavigationController;
25 |
26 | @Nullable
27 | @Override
28 | protected View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
29 | View v = inflater.inflate(R.layout.fragment_two, container, false);
30 | TextView t = (TextView) v.findViewById(R.id.title);
31 |
32 | v.findViewById(R.id.childButton).setOnClickListener(new View.OnClickListener() {
33 | @Override
34 | public void onClick(View view) {
35 | nextFragment();
36 | }
37 | });
38 |
39 | FragmentNavigationController navigationController = getNavigationController();
40 | if(navigationController != null) {
41 | t.setText("" + navigationController.getFragmentCount());
42 | }
43 |
44 | childNavigationController = FragmentNavigationController.navigationController(getChildFragmentManager(), R.id.childFragmentContainer);
45 | childNavigationController.setPresentStyle(PresentStyle.ACCORDION_LEFT);
46 | childNavigationController.setInterpolator(new AccelerateDecelerateInterpolator());
47 |
48 | nextFragment();
49 |
50 | return v;
51 | }
52 |
53 | @Override
54 | public void onStart() {
55 | super.onStart();
56 | Random r = new Random();
57 | getContentView().setBackgroundColor(Color.rgb(r.nextInt(256), r.nextInt(256), r.nextInt(256)));
58 | }
59 |
60 | private void nextFragment() {
61 | Random r = new Random();
62 | childNavigationController.setPresentStyle(r.nextInt(39)+1); //exclude NONE present style
63 | childNavigationController.presentFragment(new ChildFragment());
64 | }
65 |
66 | @Override
67 | public void onShowFragment() {
68 | Log.d("TAGTAG", "onShowFragment - Two");
69 | }
70 |
71 | @Override
72 | public void onHideFragment() {
73 | Log.d("TAGTAG", "onHideFragment - Two");
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/app/src/main/java/kr/pe/burt/android/lib/fragmentnavigationcontroller/app/FragmentOne.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.lib.fragmentnavigationcontroller.app;
2 |
3 | import android.graphics.Color;
4 | import android.os.Bundle;
5 | import android.support.annotation.Nullable;
6 | import android.util.Log;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.view.animation.AccelerateDecelerateInterpolator;
11 | import android.widget.TextView;
12 |
13 | import org.w3c.dom.Text;
14 |
15 | import java.util.Random;
16 |
17 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.AndroidFragment;
18 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.FragmentNavigationController;
19 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.PresentStyle;
20 |
21 | /**
22 | * Created by burt on 2016. 5. 22..
23 | */
24 | public class FragmentOne extends AndroidFragment {
25 |
26 | FragmentNavigationController childNavigationController;
27 |
28 | @Nullable
29 | @Override
30 | protected View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
31 | View v = inflater.inflate(R.layout.fragment_one, container, false);
32 | TextView t = (TextView) v.findViewById(R.id.title);
33 |
34 | v.findViewById(R.id.childButton).setOnClickListener(new View.OnClickListener() {
35 | @Override
36 | public void onClick(View view) {
37 | nextFragment();
38 | }
39 | });
40 |
41 | FragmentNavigationController navigationController = getNavigationController();
42 | if(navigationController != null) {
43 | t.setText("" + navigationController.getFragmentCount());
44 | }
45 |
46 | childNavigationController = FragmentNavigationController.navigationController(getChildFragmentManager(), R.id.childFragmentContainer);
47 | childNavigationController.setPresentStyle(PresentStyle.ACCORDION_LEFT);
48 | childNavigationController.setInterpolator(new AccelerateDecelerateInterpolator());
49 |
50 | nextFragment();
51 |
52 | return v;
53 | }
54 |
55 | @Override
56 | public void onStart() {
57 | super.onStart();
58 | Random r = new Random();
59 | getContentView().setBackgroundColor(Color.rgb(r.nextInt(256), r.nextInt(256), r.nextInt(256)));
60 | }
61 |
62 | private void nextFragment() {
63 | Random r = new Random();
64 | childNavigationController.setPresentStyle(r.nextInt(39)+1); //exclude NONE present style
65 | childNavigationController.presentFragment(new ChildFragment());
66 | }
67 |
68 | @Override
69 | public void onShowFragment() {
70 | Log.d("TAGTAG", "onShowFragment - One");
71 | }
72 |
73 | @Override
74 | public void onHideFragment() {
75 | Log.d("TAGTAG", "onHideFragment - One");
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/examples/TabBarExample/app/src/main/java/kr/pe/burt/android/tabbarexample/MainActivity.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.tabbarexample;
2 |
3 | import android.support.design.widget.TabLayout;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.os.Bundle;
6 | import android.support.v7.widget.Toolbar;
7 | import android.view.View;
8 | import android.view.animation.AccelerateDecelerateInterpolator;
9 | import android.view.animation.BounceInterpolator;
10 | import android.view.animation.OvershootInterpolator;
11 |
12 | import butterknife.BindView;
13 | import butterknife.ButterKnife;
14 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.FragmentNavigationController;
15 | import kr.pe.burt.android.lib.fragmentnavigationcontroller.PresentStyle;
16 |
17 | public class MainActivity extends AppCompatActivity {
18 |
19 | @BindView(R.id.toolbar)
20 | Toolbar toolbar;
21 |
22 | @BindView(R.id.tabs)
23 | TabLayout tabs;
24 |
25 | @BindView(R.id.tabContainer1)
26 | View tabContainer1;
27 |
28 | @BindView(R.id.tabContainer2)
29 | View tabContainer2;
30 |
31 | @BindView(R.id.tabContainer3)
32 | View tabContainer3;
33 |
34 |
35 | FragmentNavigationController listTab = null;
36 | FragmentNavigationController cardTab = null;
37 | FragmentNavigationController tileTab = null;
38 | FragmentNavigationController currentNavigationController = null;
39 | @Override
40 | protected void onCreate(Bundle savedInstanceState) {
41 | super.onCreate(savedInstanceState);
42 | setContentView(R.layout.activity_main);
43 | ButterKnife.bind(this);
44 | setSupportActionBar(toolbar);
45 | setupNavigationController();
46 | tabs.addTab(tabs.newTab().setText("Random"));
47 | tabs.addTab(tabs.newTab().setText("Accordion"));
48 | tabs.addTab(tabs.newTab().setText("Push"));
49 | tabs.setOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
50 | @Override
51 | public void onTabSelected(TabLayout.Tab tab) {
52 | switch (tab.getPosition()) {
53 | case 0:
54 | tabContainer1.setVisibility(View.VISIBLE);
55 | tabContainer2.setVisibility(View.GONE);
56 | tabContainer3.setVisibility(View.GONE);
57 | currentNavigationController = listTab;
58 | break;
59 | case 1:
60 | tabContainer1.setVisibility(View.GONE);
61 | tabContainer2.setVisibility(View.VISIBLE);
62 | tabContainer3.setVisibility(View.GONE);
63 | currentNavigationController = cardTab;
64 | break;
65 | case 2:
66 | tabContainer1.setVisibility(View.GONE);
67 | tabContainer2.setVisibility(View.GONE);
68 | tabContainer3.setVisibility(View.VISIBLE);
69 | currentNavigationController = tileTab;
70 | break;
71 | }
72 | }
73 |
74 | @Override
75 | public void onTabUnselected(TabLayout.Tab tab) {
76 | }
77 |
78 | @Override
79 | public void onTabReselected(TabLayout.Tab tab) {
80 |
81 | }
82 | });
83 | }
84 |
85 | private void setupNavigationController() {
86 |
87 | listTab = FragmentNavigationController.navigationController(this, R.id.tabContainer1);
88 | listTab.setPresentStyle(PresentStyle.ACCORDION_LEFT);
89 | listTab.setInterpolator(new AccelerateDecelerateInterpolator());
90 | listTab.presentFragment(new FragmentFirst());
91 |
92 |
93 | cardTab = FragmentNavigationController.navigationController(this, R.id.tabContainer2);
94 | cardTab.setPresentStyle(PresentStyle.ACCORDION_LEFT);
95 | cardTab.setInterpolator(new BounceInterpolator());
96 | cardTab.presentFragment(new FragmentSecond());
97 |
98 |
99 | tileTab = FragmentNavigationController.navigationController(this, R.id.tabContainer3);
100 | tileTab.setPresentStyle(PresentStyle.SLIDE_LEFT);
101 | tileTab.setInterpolator(new OvershootInterpolator());
102 | tileTab.presentFragment(new FragmentThird());
103 |
104 | currentNavigationController = listTab;
105 | }
106 |
107 |
108 | @Override
109 | public void onBackPressed() {
110 | if(currentNavigationController == null) {
111 | super.onBackPressed();
112 | }
113 |
114 | if(!currentNavigationController.dismissFragment()) {
115 | super.onBackPressed();
116 | }
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/java/kr/pe/burt/android/lib/fragmentnavigationcontroller/AndroidFragment.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.lib.fragmentnavigationcontroller;
2 |
3 |
4 | import android.animation.Animator;
5 | import android.animation.AnimatorInflater;
6 | import android.app.Fragment;
7 | import android.app.FragmentTransaction;
8 | import android.os.Bundle;
9 | import android.support.annotation.Nullable;
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 |
14 | import java.lang.ref.WeakReference;
15 |
16 | /**
17 | * Created by burt on 2016. 5. 24..
18 | */
19 | public abstract class AndroidFragment extends Fragment {
20 |
21 | private WeakReference weakFragmentNaviagationController = null;
22 | protected boolean animatable = true;
23 | private AndroidFragmentFrameLayout innerRootLayout = null;
24 | private View contentView = null;
25 | private PresentStyle presentStyle = null;
26 |
27 | public FragmentNavigationController getNavigationController() {
28 | if(weakFragmentNaviagationController == null)
29 | return null;
30 | return weakFragmentNaviagationController.get();
31 | }
32 |
33 | protected void setNavigationController(FragmentNavigationController fragmentNavigationController) {
34 | weakFragmentNaviagationController = new WeakReference<>(fragmentNavigationController);
35 | }
36 |
37 |
38 | protected void setAnimatable(boolean animatable) {
39 | this.animatable = animatable;
40 | }
41 |
42 | protected void setPresentStyle(PresentStyle presentStyle) {
43 | this.presentStyle = presentStyle;
44 | }
45 |
46 | @Nullable
47 | @Override
48 | final public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
49 | View v = onCreateContentView(inflater, container, savedInstanceState);
50 | if(v == null) return v;
51 | contentView = v;
52 | innerRootLayout = new AndroidFragmentFrameLayout(getActivity());
53 | innerRootLayout.addView(contentView);
54 | return innerRootLayout;
55 | }
56 |
57 | @Nullable
58 | abstract protected View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState);
59 |
60 | /**
61 | * This is the layout for wrapping contentView
62 | * @return AndroidFragmentFrameLayout
63 | */
64 | public AndroidFragmentFrameLayout getRootLayout() {
65 | return innerRootLayout;
66 | }
67 |
68 | /**
69 | * This is the layout-view which is definded by user.
70 | * @return content view
71 | */
72 | public View getContentView() {
73 | return contentView;
74 | }
75 |
76 | @Override
77 | public Animator onCreateAnimator(final int transit, final boolean enter, int nextAnim) {
78 | if(animatable == false) {
79 | animatable = true;
80 | return null;
81 | }
82 |
83 | FragmentNavigationController nav = getNavigationController();
84 | if(nav == null) {
85 | return null; //no animatable
86 | }
87 |
88 | if(presentStyle == null) {
89 | return null; //no animatable
90 | }
91 |
92 | Animator animator = null;
93 | if(transit == FragmentTransaction.TRANSIT_FRAGMENT_OPEN) {
94 |
95 | if (enter) {
96 | int id = presentStyle.getOpenEnterAnimatorId();
97 | if(id != -1) animator = AnimatorInflater.loadAnimator(getActivity(), id);
98 | } else {
99 | int id = presentStyle.getOpenExitAnimatorId();
100 | if(id != -1) animator = AnimatorInflater.loadAnimator(getActivity(), id);
101 | }
102 |
103 | } else {
104 |
105 | if (enter) {
106 | int id = presentStyle.getCloseEnterAnimatorId();
107 | if(id != -1) animator = AnimatorInflater.loadAnimator(getActivity(), id);
108 | } else {
109 | int id = presentStyle.getCloseExitAnimatorId();
110 | if(id != -1) animator = AnimatorInflater.loadAnimator(getActivity(), id);
111 | }
112 | }
113 | if(animator != null) {
114 | animator.setInterpolator(nav.getInterpolator());
115 | animator.setDuration(nav.getDuration());
116 | }
117 |
118 | animator.addListener(new Animator.AnimatorListener() {
119 | @Override
120 | public void onAnimationStart(Animator animator) {
121 |
122 | if(transit == FragmentTransaction.TRANSIT_FRAGMENT_OPEN) {
123 |
124 | if(enter) {
125 | onShowFragment();
126 | } else {
127 | //onHideFragment();
128 | }
129 | } else {
130 |
131 | if(enter) {
132 | onShowFragment();
133 | } else {
134 | onHideFragment();
135 | }
136 | }
137 |
138 |
139 | }
140 |
141 | @Override
142 | public void onAnimationEnd(Animator animator) {
143 | }
144 |
145 | @Override
146 | public void onAnimationCancel(Animator animator) {
147 |
148 | }
149 |
150 | @Override
151 | public void onAnimationRepeat(Animator animator) {
152 |
153 | }
154 | });
155 | return animator;
156 | }
157 |
158 | public void onShowFragment() {}
159 | public void onHideFragment() {}
160 | }
161 |
--------------------------------------------------------------------------------
/examples/TabBarExample/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/java/kr/pe/burt/android/lib/fragmentnavigationcontroller/FragmentNavigationController.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.lib.fragmentnavigationcontroller;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.app.Activity;
5 | import android.app.FragmentManager;
6 | import android.app.FragmentTransaction;
7 | import android.os.Bundle;
8 | import android.support.annotation.IdRes;
9 | import android.support.annotation.NonNull;
10 | import android.support.annotation.Nullable;
11 | import android.view.LayoutInflater;
12 | import android.view.View;
13 | import android.view.ViewGroup;
14 | import android.view.animation.AccelerateDecelerateInterpolator;
15 | import android.view.animation.Interpolator;
16 | import android.view.animation.LinearInterpolator;
17 |
18 | import java.lang.ref.WeakReference;
19 | import java.util.Stack;
20 |
21 | /**
22 | * Created by burt on 2016. 5. 24..
23 | */
24 | @SuppressLint("ValidFragment")
25 | public class FragmentNavigationController extends AndroidFragment {
26 |
27 | private FragmentManager fragmentManager = null;
28 | private Stack fragmentStack = new Stack<>();
29 | private @IdRes int containerViewId;
30 | private Object sync = new Object();
31 | private PresentStyle presentStyle = PresentStyle.get(PresentStyle.NONE);
32 | private Interpolator interpolator = new LinearInterpolator();
33 | private long duration = 500;
34 |
35 | public static FragmentNavigationController navigationController(@NonNull FragmentManager fragmentManager, @IdRes int containerViewId) {
36 | return new FragmentNavigationController(fragmentManager, containerViewId);
37 | }
38 |
39 | private FragmentNavigationController(@NonNull FragmentManager fragmentManager, @IdRes int containerViewId) {
40 | setRetainInstance(true);
41 | this.containerViewId = containerViewId;
42 | this.fragmentManager = fragmentManager;
43 |
44 | synchronized (sync) {
45 | // 자기 자신을 넣는다.
46 | fragmentManager
47 | .beginTransaction()
48 | .replace(containerViewId, this, "navigation-controller")
49 | .commit();
50 | }
51 | }
52 |
53 | @Nullable
54 | @Override
55 | protected View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
56 | return null;
57 | }
58 |
59 | public int getFragmentCount() {
60 | return fragmentStack.size();
61 | }
62 |
63 |
64 | /**
65 | * set the present style
66 | * @param style
67 | */
68 | public void setPresentStyle(int style) {
69 | presentStyle = PresentStyle.get(style);
70 | }
71 |
72 | /**
73 | * for setting of user defined PrensetStyle
74 | * @param style
75 | */
76 | public void setPresentStyle(PresentStyle style) {
77 | presentStyle = style;
78 | }
79 |
80 | PresentStyle getPresentStyle() {
81 | return presentStyle;
82 | }
83 |
84 | public void setInterpolator(Interpolator interpolator) {
85 | this.interpolator = interpolator;
86 | }
87 |
88 | public void setDuration(long presentDuration) {
89 | duration = presentDuration;
90 | }
91 |
92 | Interpolator getInterpolator() {
93 | return interpolator;
94 | }
95 |
96 | long getDuration() {
97 | return duration;
98 | }
99 |
100 | public void pushFragment(AndroidFragment fragment) {
101 | PresentStyle oldPresetStyle = presentStyle;
102 | setDuration(300);
103 | setInterpolator(new AccelerateDecelerateInterpolator());
104 | setPresentStyle(PresentStyle.SLIDE_LEFT);
105 | presentFragment(fragment);
106 | presentStyle = oldPresetStyle;
107 | setPresentStyle(presentStyle);
108 | }
109 |
110 | public void popFragment() {
111 | dismissFragment();
112 | }
113 |
114 | public void presentFragment(AndroidFragment fragment) {
115 | presentFragment(fragment, true);
116 | }
117 |
118 | public void presentFragment(AndroidFragment fragment, boolean withAnimation) {
119 |
120 | if(fragmentManager == null) return;
121 |
122 | synchronized (sync) {
123 |
124 | if (fragmentStack.size() == 0) {
125 | fragment.setNavigationController(this);
126 | fragment.setAnimatable(false);
127 | fragment.setPresentStyle(presentStyle);
128 | fragmentManager
129 | .beginTransaction()
130 | .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
131 | .replace(containerViewId, fragment, "root")
132 | .commit();
133 |
134 | } else {
135 |
136 | fragment.setNavigationController(this);
137 | fragment.setAnimatable(withAnimation);
138 | fragment.setPresentStyle(presentStyle);
139 | // hide last fragment and add new fragment
140 | AndroidFragment hideFragment = fragmentStack.peek();
141 | hideFragment.onHideFragment();
142 | fragmentManager
143 | .beginTransaction()
144 | .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
145 | .hide(hideFragment)
146 | .add(containerViewId, fragment, fragment.getClass().getName())
147 | .commit();
148 | }
149 | fragmentStack.add(fragment);
150 | }
151 | }
152 |
153 | public boolean dismissFragment() {
154 | return dismissFragment(true);
155 | }
156 |
157 | public boolean dismissFragment(boolean withAnimation) {
158 |
159 | if(fragmentManager == null) return false;
160 |
161 | // fragmentStack only has root fragment
162 | if(fragmentStack.size() == 1) {
163 |
164 | // show the root fragment
165 | AndroidFragment fragmentToShow = fragmentStack.peek();
166 | fragmentToShow.setNavigationController(this);
167 | fragmentToShow.setAnimatable(withAnimation);
168 | fragmentManager
169 | .beginTransaction()
170 | .show(fragmentToShow)
171 | .commit();
172 | return false;
173 | }
174 |
175 |
176 | synchronized (sync) {
177 |
178 | AndroidFragment fragmentToRemove = fragmentStack.pop();
179 | fragmentToRemove.setNavigationController(this);
180 | fragmentToRemove.setAnimatable(withAnimation);
181 |
182 | AndroidFragment fragmentToShow = fragmentStack.peek();
183 | fragmentToShow.setNavigationController(this);
184 | fragmentToShow.setAnimatable(withAnimation);
185 | fragmentManager
186 | .beginTransaction()
187 | .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_CLOSE)
188 | .show(fragmentToShow)
189 | .remove(fragmentToRemove)
190 | .commit();
191 |
192 | }
193 | return true;
194 | }
195 |
196 | public void popToRootFragment() {
197 | while (fragmentStack.size() >= 2) {
198 | dismissFragment();
199 | }
200 | }
201 |
202 | }
203 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # FragmentNavigationController
2 |
3 | [](http://developer.android.com/index.html)
4 | [](https://android-arsenal.com/api?level=13)
5 | [](http://opensource.org/licenses/MIT)
6 |
7 |
8 |
9 | FragmentNavigationController is a convenient utility class for navigating fragments on Android. It is similar to iOS UINavigationController. FragmentNavigationController manages fragment stack for you. You just use presentFragment() and dismissFragment() method of it. FragmentNavigationController also provides many present styles(transition style) for transition between two fragments.
10 |
11 | |  |  |
12 | |:-:|:-:|
13 | | [Random transition showcase](https://github.com/skyfe79/FragmentNavigationController/tree/master/app/src/main/java/kr/pe/burt/android/lib/fragmentnavigationcontroller/app) | [Tabbar example](https://github.com/skyfe79/FragmentNavigationController/tree/master/examples/TabBarExample/app/src/main/java/kr/pe/burt/android/tabbarexample) |
14 |
15 |
16 |
17 |
18 | ## Setup Gradle
19 |
20 | ```groovy
21 | dependencies {
22 | ...
23 | compile 'kr.pe.burt.android.lib:fragmentnavigationcontroller:0.0.4'
24 | }
25 | ```
26 |
27 | ## How to use it?
28 |
29 | First of all, declare fragment container place in Activity's layout XML file.
30 |
31 | ```xml
32 |
33 |
39 |
40 |
41 |
46 |
47 |
48 |
49 |
50 | ```
51 |
52 | And then, install a FragmentNavigationController in your activity like below:
53 |
54 | ```java
55 |
56 | public class MainActivity extends AppCompatActivity {
57 |
58 | ...
59 |
60 | FragmentNavigationController navigationController;
61 |
62 | @Override
63 | protected void onCreate(Bundle savedInstanceState) {
64 | super.onCreate(savedInstanceState);
65 | setContentView(R.layout.activity_main);
66 |
67 | navigationController = FragmentNavigationController.navigationController(getFragmentManager(), R.id.fragmentContainer);
68 | }
69 |
70 | ...
71 | }
72 | ```
73 |
74 | It's all to use FragmentNavigationController.
75 |
76 | ## Present and Dismiss Fragment
77 |
78 | FragmentNavigationController has cons. to use it. You must inherit your fragment from AndroidFragment which is in FragmentNavigationController package. This is for the beautiful transition effects and others. After inheriting from AndroidFragment, You must implement abstract method `onCreateContentView` where you provide fragment's layout view.
79 |
80 | ```java
81 | public class FragmentOne extends AndroidFragment {
82 |
83 | @Nullable
84 | @Override
85 | protected View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
86 | return inflater.inflate(R.layout.fragment_one, container, false);
87 | }
88 |
89 | }
90 | ```
91 |
92 | * Present Fragment
93 |
94 | ```java
95 | navigationController.presentFragment(new FragmentOne());
96 | ```
97 |
98 | * dismiss Fragment
99 |
100 | ```java
101 | navigationController.dismissFragment()
102 | ```
103 |
104 | ## Set the present style, duration and interpolator.
105 |
106 | You can set the present style, duration and interpolator whatever you want.
107 |
108 | ### Present Style
109 |
110 | Using setPresentStyle() method, you can set many present style for fragment transition. There are 40 preset present style for you. Also you can set your custom present style by using animator xml files.
111 |
112 | ```java
113 | navigationController.setPresentStyle(PresentStyle.ACCORDION_LEFT);
114 | ```
115 |
116 | ### Duration and Interpolator
117 |
118 | Using setDuration() and setInterpolator() method, you can set the duration of present animation and the interpolator for the animation.
119 |
120 | ```java
121 | navigationController.setDuration(500);
122 | navigationController.setInterpolator(new AccelerateDecelerateInterpolator());
123 | ```
124 |
125 | ### The list of present style
126 |
127 | * `NONE`
128 | * `ACCORDION_LEFT`
129 | * `ACCORDION_RIGHT`
130 | * `ACCORDION_UP`
131 | * `ACCORDION_DOWN`
132 | * `CARD_FLIP_LEFT`
133 | * `CARD_FLIP_RIGHT`
134 | * `CARD_FLIP_UP`
135 | * `CARD_FLIP_DOWN`
136 | * `CUBE_LEFT`
137 | * `CUBE_RIGHT`
138 | * `CUBE_UP`
139 | * `CUBE_DOWN`
140 | * `FADE`
141 | * `GLIDE`
142 | * `ROTATE_DOWN_LEFT`
143 | * `ROTATE_DOWN_RIGHT`
144 | * `ROTATE_UP_LEFT`
145 | * `ROTATE_UP_RIGHT`
146 | * `ROTATE_LEFT_UP`
147 | * `ROTATE_LEFT_DOWN`
148 | * `ROTATE_RIGHT_UP`
149 | * `ROTATE_RIGHT_DOWN`
150 | * `SCALEX`
151 | * `SCALEY`
152 | * `SCALEXY`
153 | * `SLIDE_LEFT`
154 | * `SLIDE_RIGHT`
155 | * `SLIDE_UP`
156 | * `SLIDE_DOWN`
157 | * `STACK_LEFT`
158 | * `STACK_RIGHT`
159 | * `TABLE_LEFT`
160 | * `TABLE_RIGHT`
161 | * `TABLE_UP`
162 | * `TABLE_DOWN`
163 | * `ZOOM_FROM_LEFT_TOP_CORNER`
164 | * `ZOOM_FROM_RIGHT_TOP_CORNER`
165 | * `ZOOM_FROM_LEFT_BOTTOM_CORNER`
166 | * `ZOOM_FROM_RIGHT_BOTTOM_CORNER`
167 |
168 | ## Manage back button and fragment stack.
169 |
170 | You should manage back button and fragment stack by manually like below:
171 |
172 | ```java
173 | @Override
174 | public void onBackPressed() {
175 | if(navigationController.dismissFragment() == false) {
176 | super.onBackPressed();
177 | }
178 | }
179 | ```
180 |
181 | ## APIs
182 |
183 | ### FragmentNavigationController
184 |
185 | * setPresentStyle(int style)
186 | * setPresentStyle(PresentStyle style)
187 | * setInterpolator(Interpolator interpolator)
188 | * setDuration(long presentDuration)
189 | * pushFragment(AndroidFragment fragment)
190 | * popFragment()
191 | * presentFragment(AndroidFragment fragment)
192 | * presentFragment(AndroidFragment fragment, boolean withAnimation)
193 | * dismissFragment()
194 | * dismissFragment(boolean withAnimation)
195 | * popToRootFragment()
196 |
197 | ### AndroidFragment
198 |
199 | * onShowFragment()
200 | * onHideFragment()
201 |
202 | ## Extreme special thanks
203 |
204 | * `FragmentTransactionExtended` by Antonio Corrales : [https://github.com/DesarrolloAntonio/FragmentTransactionExtended](https://github.com/DesarrolloAntonio/FragmentTransactionExtended)
205 | * FragmentNavigationController can be born because there is FragmentTransactionExtended project. FragmentNavigationController use animator xml files of FragmentTransactionExtended.
206 |
207 | ## MIT License
208 |
209 | The MIT License
210 |
211 | Copyright © 2015 Sungcheol Kim, http://github.com/skyfe79/FragmentNavigationController
212 |
213 | Permission is hereby granted, free of charge, to any person obtaining a copy
214 | of this software and associated documentation files (the "Software"), to deal
215 | in the Software without restriction, including without limitation the rights
216 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
217 | copies of the Software, and to permit persons to whom the Software is
218 | furnished to do so, subject to the following conditions:
219 |
220 | The above copyright notice and this permission notice shall be included in
221 | all copies or substantial portions of the Software.
222 |
223 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
224 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
225 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
226 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
227 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
228 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
229 | THE SOFTWARE.
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/java/kr/pe/burt/android/lib/fragmentnavigationcontroller/AndroidFragmentFrameLayout.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.lib.fragmentnavigationcontroller;
2 |
3 | import android.annotation.TargetApi;
4 | import android.content.Context;
5 | import android.os.Build;
6 | import android.util.AttributeSet;
7 | import android.view.ViewTreeObserver;
8 | import android.widget.FrameLayout;
9 |
10 | /**
11 | * Created by burt on 2016. 5. 26..
12 | */
13 | class AndroidFragmentFrameLayout extends FrameLayout {
14 | private float yFraction = 0;
15 | private float xFraction = 0;
16 | private ViewTreeObserver.OnPreDrawListener preDrawListener = null;
17 |
18 | public AndroidFragmentFrameLayout(Context context) {
19 | super(context);
20 | }
21 |
22 | public AndroidFragmentFrameLayout(Context context, AttributeSet attrs) {
23 | super(context, attrs);
24 | }
25 |
26 | public AndroidFragmentFrameLayout(Context context, AttributeSet attrs, int defStyleAttr) {
27 | super(context, attrs, defStyleAttr);
28 | }
29 |
30 |
31 | @TargetApi(Build.VERSION_CODES.LOLLIPOP)
32 | public AndroidFragmentFrameLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
33 | super(context, attrs, defStyleAttr, defStyleRes);
34 | }
35 |
36 |
37 | public void setAccordionPivotZero(float value) {
38 | setAlpha(1.0f);
39 | setScaleX(value);
40 | setPivotX(0);
41 | }
42 |
43 | public void setAccordionPivotWidth(float value) {
44 | setAlpha(1.0f);
45 | setScaleX(value);
46 | setPivotX(getWidth());
47 | }
48 |
49 | public void setAccordionVerticalPivotZero(float value) {
50 | setAlpha(1.0f);
51 | setScaleY(value);
52 | setPivotY(0);
53 | }
54 |
55 | public void setAccordionPivotHeight(float value) {
56 | setAlpha(1.0f);
57 | setScaleY(value);
58 | setPivotY(getHeight());
59 | }
60 |
61 | public void setCube(float fraction) {
62 | float translationX = getWidth() * fraction;
63 | setTranslationX(translationX);
64 | setRotationY(90 * fraction);
65 | setPivotX(0);
66 | setPivotY(getHeight() / 2);
67 | }
68 |
69 | public void setCubeVertical(float fraction) {
70 | float translationY = getHeight() * fraction;
71 | setTranslationY(translationY);
72 | setRotationX(-90 * fraction);
73 | setPivotY(0);
74 | setPivotX(getWidth() / 2);
75 | }
76 |
77 | public void setCubeBack(float fraction) {
78 | float translationX = getWidth() * fraction;
79 | setTranslationX(translationX);
80 | setRotationY(90 * fraction);
81 | setPivotY(getHeight() / 2);
82 | setPivotX(getWidth());
83 | }
84 |
85 | public void setCubeVerticalBack(float fraction) {
86 | float translationY = getHeight() * fraction;
87 | setTranslationY(translationY);
88 | setRotationX(-90 * fraction);
89 | setPivotX(getWidth() / 2);
90 | setPivotY(getHeight());
91 | }
92 |
93 | public void setGlide(float fraction) {
94 | float translationX = getWidth() * fraction;
95 | setTranslationX(translationX);
96 | setRotationY(90 * fraction);
97 | setPivotX(0);
98 | }
99 |
100 | public void setGlideBack(float fraction) {
101 | float translationX = getWidth() * fraction;
102 | setTranslationX(translationX);
103 | setRotationY(90 * fraction);
104 | setPivotX(0);
105 | setPivotY(getHeight() / 2);
106 | }
107 |
108 | public void setRotateDown(float fraction) {
109 | float translationX = getWidth() * fraction;
110 | setTranslationX(translationX);
111 | setRotation(20 * fraction);
112 | setPivotY(getHeight());
113 | setPivotX(getWidth() / 2);
114 | }
115 |
116 | public void setRotateUp(float fraction) {
117 | float translationX = getWidth() * fraction;
118 | setTranslationX(translationX);
119 | setRotation(-20 * fraction);
120 | setPivotY(0);
121 | setPivotX(getWidth() / 2);
122 | }
123 |
124 | public void setRotateLeft(float fraction) {
125 | float translationY = getHeight() * fraction;
126 | setTranslationY(translationY);
127 | setRotation(20 * fraction);
128 | setPivotX(0);
129 | setPivotY(getHeight() / 2);
130 | }
131 |
132 | public void setRotateRight(float fraction) {
133 | float translationY = getHeight() * fraction;
134 | setTranslationY(translationY);
135 | setRotation(-20 * fraction);
136 | setPivotX(getWidth());
137 | setPivotY(getHeight() / 2);
138 | }
139 |
140 | public void setYFraction(float fraction) {
141 | this.yFraction = fraction;
142 | if (getHeight() == 0) {
143 | if (preDrawListener == null) {
144 | preDrawListener = new ViewTreeObserver.OnPreDrawListener() {
145 | @Override
146 | public boolean onPreDraw() {
147 | getViewTreeObserver().removeOnPreDrawListener(
148 | preDrawListener);
149 | setYFraction(yFraction);
150 | return true;
151 | }
152 | };
153 | getViewTreeObserver().addOnPreDrawListener(preDrawListener);
154 | }
155 | return;
156 | }
157 | float translationY = getHeight() * fraction;
158 | setTranslationY(translationY);
159 | }
160 |
161 | public void setXFraction(float fraction) {
162 | this.xFraction = fraction;
163 | if (getWidth() == 0) {
164 | if (preDrawListener == null) {
165 | preDrawListener = new ViewTreeObserver.OnPreDrawListener() {
166 | @Override
167 | public boolean onPreDraw() {
168 | getViewTreeObserver().removeOnPreDrawListener(
169 | preDrawListener);
170 | setXFraction(xFraction);
171 | return true;
172 | }
173 | };
174 | getViewTreeObserver().addOnPreDrawListener(preDrawListener);
175 | }
176 | return;
177 | }
178 | float translationX = getWidth() * fraction;
179 | setTranslationX(translationX);
180 | }
181 |
182 | public void setTableHorizontalPivotZero(float fraction) {
183 | setRotationY(90 * fraction);
184 | setPivotX(0);
185 | setPivotY(getHeight() / 2);
186 | }
187 |
188 | public void setTableHorizontalPivotWidth(float fraction) {
189 | setRotationY(-90 * fraction);
190 | setPivotX(getWidth());
191 | setPivotY(getHeight() / 2);
192 | }
193 |
194 | public void setTableVerticalPivotZero(float fraction) {
195 | setRotationX(-90 * fraction);
196 | setPivotX(getWidth() / 2);
197 | setPivotY(0);
198 | }
199 |
200 | public void setTableVerticalPivotHeight(float fraction) {
201 | setRotationX(90 * fraction);
202 | setPivotX(getWidth() / 2);
203 | setPivotY(getHeight());
204 | }
205 |
206 | public void setZoomFromCornerPivotHG(float fraction) {
207 | setScaleX(fraction);
208 | setScaleY(fraction);
209 | setPivotX(getWidth());
210 | setPivotY(getHeight());
211 | }
212 |
213 | public void setZoomFromCornerPivotZero(float fraction) {
214 | setScaleX(fraction);
215 | setScaleY(fraction);
216 | setPivotX(0);
217 | setPivotY(0);
218 | }
219 |
220 | public void setZoomFromCornerPivotWidth(float fraction) {
221 | setScaleX(fraction);
222 | setScaleY(fraction);
223 | setPivotX(getWidth());
224 | setPivotY(0);
225 | }
226 |
227 | public void setZoomFromCornerPivotHeight(float fraction) {
228 | setScaleX(fraction);
229 | setScaleY(fraction);
230 | setPivotX(0);
231 | setPivotY(getHeight());
232 | }
233 |
234 | public void setZoomSlideHorizontal(float fraction) {
235 | setTranslationX(getWidth() * fraction);
236 | setPivotX(getWidth() / 2);
237 | setPivotY(getHeight() / 2);
238 | }
239 |
240 | public void setZoomSlideVertical(float fraction) {
241 | setTranslationY(getHeight() * fraction);
242 | setPivotX(getWidth() / 2);
243 | setPivotY(getHeight() / 2);
244 | }
245 | }
246 |
--------------------------------------------------------------------------------
/app/app.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | generateDebugSources
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/fragmentnavigationcontroller.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | generateDebugSources
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/fragmentnavigationcontroller/src/main/java/kr/pe/burt/android/lib/fragmentnavigationcontroller/PresentStyle.java:
--------------------------------------------------------------------------------
1 | package kr.pe.burt.android.lib.fragmentnavigationcontroller;
2 |
3 | /**
4 | * Created by burt on 2016. 5. 26..
5 | */
6 | public class PresentStyle {
7 |
8 | public static final int NONE = 0;
9 | public static final int ACCORDION_LEFT = 1;
10 | public static final int ACCORDION_RIGHT = 2;
11 | public static final int ACCORDION_UP = 3;
12 | public static final int ACCORDION_DOWN = 4;
13 | public static final int CARD_FLIP_LEFT = 5;
14 | public static final int CARD_FLIP_RIGHT = 6;
15 | public static final int CARD_FLIP_UP = 7;
16 | public static final int CARD_FLIP_DOWN = 8;
17 | public static final int CUBE_LEFT = 9;
18 | public static final int CUBE_RIGHT = 10;
19 | public static final int CUBE_UP = 11;
20 | public static final int CUBE_DOWN = 12;
21 | public static final int FADE = 13;
22 | public static final int GLIDE = 14;
23 | public static final int ROTATE_DOWN_LEFT = 15;
24 | public static final int ROTATE_DOWN_RIGHT = 16;
25 | public static final int ROTATE_UP_LEFT = 17;
26 | public static final int ROTATE_UP_RIGHT = 18;
27 | public static final int ROTATE_LEFT_UP = 19;
28 | public static final int ROTATE_LEFT_DOWN = 20;
29 | public static final int ROTATE_RIGHT_UP = 21;
30 | public static final int ROTATE_RIGHT_DOWN = 22;
31 | public static final int SCALEX = 23;
32 | public static final int SCALEY = 24;
33 | public static final int SCALEXY = 25;
34 | public static final int SLIDE_LEFT = 26;
35 | public static final int SLIDE_RIGHT = 27;
36 | public static final int SLIDE_UP = 28;
37 | public static final int SLIDE_DOWN = 29;
38 | public static final int STACK_LEFT = 30;
39 | public static final int STACK_RIGHT = 31;
40 | public static final int TABLE_LEFT = 32;
41 | public static final int TABLE_RIGHT = 33;
42 | public static final int TABLE_UP = 34;
43 | public static final int TABLE_DOWN = 35;
44 | public static final int ZOOM_FROM_LEFT_TOP_CORNER = 36;
45 | public static final int ZOOM_FROM_RIGHT_TOP_CORNER = 37;
46 | public static final int ZOOM_FROM_LEFT_BOTTOM_CORNER = 38;
47 | public static final int ZOOM_FROM_RIGHT_BOTTOM_CORNER= 39;
48 |
49 |
50 | private int openEnterAnimatorId;
51 | private int openExitAnimatorId;
52 | private int closeEnterAnimatorId;
53 | private int closeExitAnimatorId;
54 |
55 |
56 | public PresentStyle(int openEnterAnimatorId, int openExitAnimatorId, int closeEnterAnimatorId, int closeExitAnimatorId) {
57 | this.openEnterAnimatorId = openEnterAnimatorId;
58 | this.openExitAnimatorId = openExitAnimatorId;
59 | this.closeEnterAnimatorId = closeEnterAnimatorId;
60 | this.closeExitAnimatorId = closeExitAnimatorId;
61 | }
62 |
63 | public int getOpenEnterAnimatorId() {
64 | return openEnterAnimatorId;
65 | }
66 |
67 | public int getOpenExitAnimatorId() {
68 | return openExitAnimatorId;
69 | }
70 |
71 | public int getCloseEnterAnimatorId() {
72 | return closeEnterAnimatorId;
73 | }
74 |
75 | public int getCloseExitAnimatorId() {
76 | return closeExitAnimatorId;
77 | }
78 |
79 | public static PresentStyle get(int style) {
80 | switch (style) {
81 | case NONE:
82 | return None();
83 | case ACCORDION_LEFT:
84 | return AccordionLeft();
85 | case ACCORDION_RIGHT:
86 | return AccordionRight();
87 | case ACCORDION_UP:
88 | return AccordionUp();
89 | case ACCORDION_DOWN:
90 | return AccordionDown();
91 | case CUBE_LEFT:
92 | return CubeLeft();
93 | case CUBE_RIGHT:
94 | return CubeRight();
95 | case CUBE_UP:
96 | return CubeUp();
97 | case CUBE_DOWN:
98 | return CubeDown();
99 | case FADE:
100 | return Fade();
101 | case CARD_FLIP_LEFT:
102 | return CardFlipLeft();
103 | case CARD_FLIP_RIGHT:
104 | return CardFlipRight();
105 | case CARD_FLIP_UP:
106 | return CardFlipUp();
107 | case CARD_FLIP_DOWN:
108 | return CardFlipDown();
109 | case GLIDE:
110 | return Glide();
111 | case ROTATE_DOWN_LEFT:
112 | return RotateDownLeft();
113 | case ROTATE_DOWN_RIGHT:
114 | return RotateDownRight();
115 | case ROTATE_UP_LEFT:
116 | return RotateUpLeft();
117 | case ROTATE_UP_RIGHT:
118 | return RotateUpRight();
119 | case ROTATE_LEFT_UP:
120 | return RotateLeftUp();
121 | case ROTATE_LEFT_DOWN:
122 | return RotateLeftDown();
123 | case ROTATE_RIGHT_UP:
124 | return RotateRightUp();
125 | case ROTATE_RIGHT_DOWN:
126 | return RotateRightDown();
127 | case SCALEX:
128 | return ScaleX();
129 | case SCALEY:
130 | return ScaleY();
131 | case SCALEXY:
132 | return ScaleXY();
133 | case SLIDE_LEFT:
134 | return SlideLeft();
135 | case SLIDE_RIGHT:
136 | return SlideRight();
137 | case SLIDE_UP:
138 | return SlideUp();
139 | case SLIDE_DOWN:
140 | return SlideDown();
141 | case STACK_LEFT:
142 | return StackLeft();
143 | case STACK_RIGHT:
144 | return StackRight();
145 | case TABLE_LEFT:
146 | return TableLeft();
147 | case TABLE_RIGHT:
148 | return TableRight();
149 | case TABLE_UP:
150 | return TableUp();
151 | case TABLE_DOWN:
152 | return TableDown();
153 | case ZOOM_FROM_LEFT_TOP_CORNER:
154 | return ZoomFromLeftTopCorner();
155 | case ZOOM_FROM_LEFT_BOTTOM_CORNER:
156 | return ZoomFromLeftBottomCorner();
157 | case ZOOM_FROM_RIGHT_TOP_CORNER:
158 | return ZoomFromRightTopCorner();
159 | case ZOOM_FROM_RIGHT_BOTTOM_CORNER:
160 | return ZoomFromRightBottomCorner();
161 | default:
162 | return None();
163 | }
164 | }
165 |
166 | private static PresentStyle None() {
167 | return new PresentStyle(R.animator.none, R.animator.none, R.animator.none, R.animator.none);
168 | }
169 |
170 | private static PresentStyle AccordionLeft() {
171 | return new PresentStyle(R.animator.accordion_right_in, R.animator.accordion_left_out, R.animator.accordion_left_in, R.animator.accordion_right_out);
172 | }
173 |
174 | private static PresentStyle AccordionRight() {
175 | return new PresentStyle(R.animator.accordion_left_in, R.animator.accordion_right_out, R.animator.accordion_right_in, R.animator.accordion_left_out);
176 | }
177 |
178 | private static PresentStyle AccordionUp() {
179 | return new PresentStyle(R.animator.accordion_vertical_right_in, R.animator.accordion_vertical_left_out, R.animator.accordion_vertical_left_in, R.animator.accordion_vertical_right_out);
180 | }
181 |
182 | private static PresentStyle AccordionDown() {
183 | return new PresentStyle(R.animator.accordion_vertical_left_in, R.animator.accordion_vertical_right_out, R.animator.accordion_vertical_right_in, R.animator.accordion_vertical_left_out);
184 | }
185 |
186 | private static PresentStyle Fade() {
187 | return new PresentStyle(R.animator.fade_in, R.animator.fade_out, R.animator.fade_in, R.animator.fade_out);
188 | }
189 |
190 | private static PresentStyle CubeLeft() {
191 | return new PresentStyle(R.animator.cube_right_in, R.animator.cube_left_out, R.animator.cube_left_in, R.animator.cube_right_out);
192 | }
193 |
194 | private static PresentStyle CubeRight() {
195 | return new PresentStyle(R.animator.cube_left_in, R.animator.cube_right_out, R.animator.cube_right_in, R.animator.cube_left_out);
196 | }
197 |
198 | private static PresentStyle CubeUp() {
199 | return new PresentStyle(R.animator.cube_vertical_right_in, R.animator.cube_vertical_left_out, R.animator.cube_vertical_left_in, R.animator.cube_vertical_right_out);
200 | }
201 |
202 | private static PresentStyle CubeDown() {
203 | return new PresentStyle(R.animator.cube_vertical_left_in, R.animator.cube_vertical_right_out, R.animator.cube_vertical_right_in, R.animator.cube_vertical_left_out);
204 | }
205 |
206 | private static PresentStyle CardFlipLeft() {
207 | return new PresentStyle(R.animator.card_flip_horizontal_right_in, R.animator.card_flip_horizontal_left_out, R.animator.card_flip_horizontal_left_in, R.animator.card_flip_horizontal_right_out);
208 | }
209 |
210 | private static PresentStyle CardFlipRight() {
211 | return new PresentStyle(R.animator.card_flip_horizontal_left_in, R.animator.card_flip_horizontal_right_out, R.animator.card_flip_horizontal_right_in, R.animator.card_flip_horizontal_left_out);
212 | }
213 |
214 | private static PresentStyle CardFlipDown() {
215 | return new PresentStyle(R.animator.card_flip_vertical_right_in, R.animator.card_flip_vertical_left_out, R.animator.card_flip_vertical_left_in, R.animator.card_flip_vertical_right_out);
216 | }
217 |
218 | private static PresentStyle CardFlipUp() {
219 | return new PresentStyle(R.animator.card_flip_vertical_left_in, R.animator.card_flip_vertical_right_out, R.animator.card_flip_vertical_right_in, R.animator.card_flip_vertical_left_out);
220 | }
221 |
222 | private static PresentStyle Glide() {
223 | return new PresentStyle(R.animator.glide_fragment_horizontal_in, R.animator.glide_fragment_horizontal_out, R.animator.glide_fragment_horizontal_in, R.animator.glide_fragment_horizontal_out);
224 | }
225 |
226 | private static PresentStyle RotateDownLeft() {
227 | return new PresentStyle(R.animator.rotatedown_right_in, R.animator.rotatedown_left_out, R.animator.rotatedown_left_in, R.animator.rotatedown_right_out);
228 | }
229 |
230 | private static PresentStyle RotateDownRight() {
231 | return new PresentStyle(R.animator.rotatedown_left_in, R.animator.rotatedown_right_out, R.animator.rotatedown_right_in, R.animator.rotatedown_left_out);
232 | }
233 |
234 | private static PresentStyle RotateUpLeft() {
235 | return new PresentStyle(R.animator.rotateup_right_in, R.animator.rotateup_left_out, R.animator.rotateup_left_in, R.animator.rotateup_right_out);
236 | }
237 |
238 | private static PresentStyle RotateUpRight() {
239 | return new PresentStyle(R.animator.rotateup_left_in, R.animator.rotateup_right_out, R.animator.rotateup_right_in, R.animator.rotateup_left_out);
240 | }
241 |
242 | private static PresentStyle RotateLeftUp() {
243 | return new PresentStyle(R.animator.rotateleft_right_in, R.animator.rotateleft_left_out, R.animator.rotateleft_left_in, R.animator.rotateleft_right_out);
244 | }
245 |
246 | private static PresentStyle RotateLeftDown() {
247 | return new PresentStyle(R.animator.rotateleft_left_in, R.animator.rotateleft_right_out, R.animator.rotateleft_right_in, R.animator.rotateleft_left_out);
248 | }
249 |
250 | private static PresentStyle RotateRightUp() {
251 | return new PresentStyle(R.animator.rotateright_right_in, R.animator.rotateright_left_out, R.animator.rotateright_left_in, R.animator.rotateright_right_out);
252 | }
253 |
254 | private static PresentStyle RotateRightDown() {
255 | return new PresentStyle(R.animator.rotateright_left_in, R.animator.rotateright_right_out, R.animator.rotateright_right_in, R.animator.rotateright_left_out);
256 | }
257 |
258 | private static PresentStyle ScaleX() {
259 | return new PresentStyle(R.animator.scalex_enter, R.animator.scalex_exit, R.animator.scalex_enter, R.animator.scalex_exit);
260 | }
261 |
262 | private static PresentStyle ScaleY() {
263 | return new PresentStyle(R.animator.scaley_enter, R.animator.scaley_exit, R.animator.scaley_enter, R.animator.scaley_exit);
264 | }
265 |
266 | private static PresentStyle ScaleXY() {
267 | return new PresentStyle(R.animator.scalexy_enter, R.animator.scalexy_exit, R.animator.scalexy_enter, R.animator.scalexy_exit);
268 | }
269 |
270 | private static PresentStyle SlideLeft() {
271 | return new PresentStyle(R.animator.slide_fragment_horizontal_right_in, R.animator.slide_fragment_horizontal_left_out, R.animator.slide_fragment_horizontal_left_in, R.animator.slide_fragment_horizontal_right_out);
272 | }
273 |
274 | private static PresentStyle SlideRight() {
275 | return new PresentStyle(R.animator.slide_fragment_horizontal_left_in, R.animator.slide_fragment_horizontal_right_out, R.animator.slide_fragment_horizontal_right_in, R.animator.slide_fragment_horizontal_left_out);
276 | }
277 |
278 | private static PresentStyle SlideUp() {
279 | return new PresentStyle(R.animator.slide_fragment_vertical_right_in, R.animator.slide_fragment_vertical_left_out, R.animator.slide_fragment_vertical_left_in, R.animator.slide_fragment_vertical_right_out);
280 | }
281 |
282 | private static PresentStyle SlideDown() {
283 | return new PresentStyle(R.animator.slide_fragment_vertical_left_in, R.animator.slide_fragment_vertical_right_out, R.animator.slide_fragment_vertical_right_in, R.animator.slide_fragment_vertical_left_out);
284 | }
285 |
286 | private static PresentStyle StackLeft() {
287 | return new PresentStyle(R.animator.stack_right_in, R.animator.stack_left_out, R.animator.stack_left_in, R.animator.stack_right_out);
288 | }
289 |
290 | private static PresentStyle StackRight() {
291 | return new PresentStyle(R.animator.stack_right_in, R.animator.slide_fragment_horizontal_right_out, R.animator.slide_fragment_horizontal_right_in, R.animator.stack_right_out);
292 | }
293 |
294 | private static PresentStyle TableLeft() {
295 | return new PresentStyle(R.animator.table_horizontal_right_in, R.animator.table_horizontal_left_out, R.animator.table_horizontal_left_in, R.animator.table_horizontal_right_out);
296 | }
297 |
298 | private static PresentStyle TableRight() {
299 | return new PresentStyle(R.animator.table_horizontal_left_in, R.animator.table_horizontal_right_out, R.animator.table_horizontal_right_in, R.animator.table_horizontal_left_out);
300 | }
301 |
302 | private static PresentStyle TableUp() {
303 | return new PresentStyle(R.animator.table_vertical_right_in, R.animator.table_vertical_left_out, R.animator.table_vertical_left_in, R.animator.table_vertical_right_out);
304 | }
305 |
306 | private static PresentStyle TableDown() {
307 | return new PresentStyle(R.animator.table_vertical_left_in, R.animator.table_vertical_right_out, R.animator.table_vertical_right_in, R.animator.table_vertical_left_out);
308 | }
309 |
310 | private static PresentStyle ZoomFromLeftTopCorner() {
311 | return new PresentStyle(R.animator.zoom_from_left_corner_right_in, R.animator.zoom_from_left_corner_left_out, R.animator.zoom_from_left_corner_left_in, R.animator.zoom_from_left_corner_right_out);
312 | }
313 |
314 | private static PresentStyle ZoomFromLeftBottomCorner() {
315 | return new PresentStyle(R.animator.zoom_from_right_corner_left_in, R.animator.zoom_from_right_corner_right_out, R.animator.zoom_from_right_corner_right_in, R.animator.zoom_from_right_corner_left_out);
316 | }
317 |
318 | private static PresentStyle ZoomFromRightTopCorner() {
319 | return new PresentStyle(R.animator.zoom_from_right_corner_right_in, R.animator.zoom_from_right_corner_left_out, R.animator.zoom_from_right_corner_left_in, R.animator.zoom_from_right_corner_right_out);
320 | }
321 |
322 | private static PresentStyle ZoomFromRightBottomCorner() {
323 | return new PresentStyle(R.animator.zoom_from_left_corner_left_in, R.animator.zoom_from_left_corner_right_out, R.animator.zoom_from_left_corner_right_in, R.animator.zoom_from_left_corner_left_out);
324 | }
325 |
326 | }
327 |
--------------------------------------------------------------------------------