├── .gitignore ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ ├── fonts │ │ ├── YanoneKaffeesatz-Bold.ttf │ │ ├── YanoneKaffeesatz-Light.ttf │ │ ├── YanoneKaffeesatz-Regular.ttf │ │ └── YanoneKaffeesatz-Thin.ttf │ └── source │ │ ├── activity_transitions.java │ │ ├── activity_transitions.java.html │ │ ├── activity_transitions.xml │ │ ├── activity_transitions.xml.html │ │ ├── activity_transitions_methods.java │ │ ├── activity_transitions_methods.java.html │ │ ├── anim1.java.html │ │ ├── at2_called.java │ │ ├── at2_called.java.html │ │ ├── at2_calling.java │ │ ├── at2_calling.java.html │ │ ├── at3_called.java │ │ ├── at3_called.java.html │ │ ├── at3_calling.java │ │ ├── at3_calling.java.html │ │ ├── at4_called.java │ │ ├── at4_called.java.html │ │ ├── at4_calling.java │ │ ├── at4_calling.java.html │ │ ├── at5_called.java │ │ ├── at5_called.java.html │ │ ├── at5_calling.java │ │ ├── at5_calling.java.html │ │ ├── at6_calling.java │ │ ├── at6_calling.java.html │ │ ├── auto.java │ │ ├── auto.java.html │ │ ├── build.gradle.html │ │ ├── custom1.java │ │ ├── custom1.java.html │ │ ├── custom2.java │ │ ├── custom2.java.html │ │ ├── custom3.java │ │ ├── custom3.java.html │ │ ├── custom4.java │ │ ├── custom4.java.html │ │ ├── delayed.java │ │ ├── delayed.java.html │ │ ├── delayed2.java │ │ ├── delayed2.java.html │ │ ├── from_details.xml │ │ ├── from_details.xml.html │ │ ├── init.java.html │ │ ├── itemclick.java.html │ │ ├── ltransition1.java.html │ │ ├── ltransition2.java.html │ │ ├── ltransition3.java.html │ │ ├── morph.xml │ │ ├── morph.xml.html │ │ ├── predraw.java.html │ │ ├── ripple_press.xml.html │ │ ├── scene_code.java │ │ ├── scene_code.java.html │ │ ├── scene_code2.java │ │ ├── scene_code2.java.html │ │ ├── scene_transition.xml │ │ ├── scene_transition.xml.html │ │ ├── scenes1.xml │ │ ├── scenes1.xml.html │ │ ├── scenes2.xml │ │ ├── scenes2.xml.html │ │ ├── scenes3.xml │ │ ├── scenes3.xml.html │ │ ├── slide_left.xml │ │ ├── slide_left.xml.html │ │ ├── tm.java.html │ │ ├── tm1.java │ │ ├── tm1.java.html │ │ ├── tm2.java │ │ ├── tm2.java.html │ │ ├── tm3.java │ │ ├── tm3.java.html │ │ ├── tm4.java │ │ ├── tm4.java.html │ │ ├── tm5.java │ │ ├── tm5.java.html │ │ ├── tm6.java.html │ │ ├── to_details.xml │ │ ├── to_details.xml.html │ │ ├── touch_anim.xml.html │ │ ├── transitions.java │ │ ├── transitions.java.html │ │ ├── transitions.xml.html │ │ └── transitions2.xml.html │ ├── java │ └── com │ │ └── luciofm │ │ └── presentation │ │ └── droiconit │ │ ├── activity │ │ ├── BaseActivity.java │ │ ├── DetailsActivity.java │ │ ├── FirstActivity.java │ │ ├── MainActivity.java │ │ ├── MovieDetailsActivity.java │ │ └── ThanksActivity.java │ │ ├── anim │ │ ├── AlphaSpan.java │ │ ├── AnimUtils.java │ │ ├── LayerEnablingAnimatorListener.java │ │ ├── TextSizeSpan.java │ │ ├── TextTransform.java │ │ ├── XFractionProperty.java │ │ └── YFractionProperty.java │ │ ├── fragment │ │ ├── ActivityTransitionFragment.java │ │ ├── AwesomeFragment.java │ │ ├── BaseFragment.java │ │ ├── HelloFragment.java │ │ ├── IntroFragment.java │ │ ├── ItemAdapter.java │ │ ├── LayoutTransitionFragment.java │ │ ├── MoreTransitionManagerFragment.java │ │ ├── MoviesFragment.java │ │ ├── MyselfFragment.java │ │ ├── QuesionsFragment.java │ │ ├── SceneFragment.java │ │ ├── SlackFragment.java │ │ ├── TransitionManagerFragment.java │ │ └── WorkFragment.java │ │ ├── model │ │ ├── Entry.java │ │ ├── Item.java │ │ ├── Items.java │ │ ├── Movie.java │ │ └── Movies.java │ │ ├── transitions │ │ ├── ChangeImageTransform.java │ │ ├── ChangeText.java │ │ ├── ChangeVideoTransform.java │ │ ├── CircleTransition.java │ │ ├── NoTransition.java │ │ ├── Pop.java │ │ ├── Recolor.java │ │ ├── TransitionListenerAdapter.java │ │ └── ZoomOut.java │ │ ├── util │ │ ├── CircleTransformation.java │ │ ├── IOUtils.java │ │ ├── PaletteTransformation.java │ │ ├── TopCropTransformation.java │ │ ├── TypefaceCache.java │ │ └── Utils.java │ │ └── widget │ │ ├── AnimatedLayout.java │ │ ├── CanvasGridLayout.java │ │ ├── SquareGridLayout.java │ │ ├── TextView.java │ │ └── TextureVideoView.java │ └── res │ ├── drawable-hdpi │ ├── android_flag.png │ ├── arlington.jpg │ ├── arlington_scene_02.jpg │ ├── awesome.jpg │ ├── crazy_heart.jpg │ ├── crazy_heart_scene_01.jpg │ ├── dog_year.jpg │ ├── dog_year_scene.jpg │ ├── goats.jpg │ ├── goats_scene_02.jpg │ ├── iron_man.jpg │ ├── iron_man_scene.jpg │ ├── lebowski.jpg │ ├── lebowski_scene_02.jpg │ ├── lebowski_ver2.jpg │ ├── lucio_badge.png │ ├── rallat.jpg │ ├── seabiscuit.jpg │ ├── seabiscuit_scene.jpg │ ├── stick_it.jpg │ ├── surfs_up.jpg │ ├── surfs_up_scene.jpg │ ├── toggle_facebook_active.png │ ├── toggle_facebook_inactive.png │ ├── toggle_twitter_inactive.png │ ├── tron.jpg │ ├── tron_legacy.jpg │ ├── tron_legacy_02.jpg │ ├── tron_screen_01.jpg │ ├── true_grit.jpg │ ├── true_grit_scene_01.jpg │ ├── whi.png │ └── whi_blur.png │ ├── drawable-nodpi │ ├── image1.png │ ├── image2.png │ ├── image3.png │ ├── image4.png │ ├── image5.png │ ├── image6.png │ ├── image7.png │ ├── image8.png │ ├── video1.png │ ├── video2.png │ ├── video3.png │ ├── video4.png │ ├── video5.png │ ├── video6.png │ ├── video7.png │ └── video8.png │ ├── drawable-xxhdpi │ ├── me.jpg │ └── solid_with_border.xml │ ├── drawable │ ├── border.xml │ ├── ic_check_white_48dp.png │ ├── ic_image.png │ ├── ic_image_crop.png │ ├── item_background_material.xml │ ├── ripple_blue.xml │ ├── ripple_press.xml │ ├── shape_circle_placeholder.xml │ ├── shape_round_corners.xml │ └── vibrant_background.xml │ ├── layout │ ├── activity_details.xml │ ├── activity_movie_details.xml │ ├── activity_thanks.xml │ ├── canvas_grid_entry.xml │ ├── fragment_activitytransition.xml │ ├── fragment_awesome.xml │ ├── fragment_hello.xml │ ├── fragment_intro.xml │ ├── fragment_layouttransition.xml │ ├── fragment_movies.xml │ ├── fragment_myself.xml │ ├── fragment_questions.xml │ ├── fragment_scene.xml │ ├── fragment_slack.xml │ ├── fragment_tm.xml │ ├── fragment_tm2.xml │ ├── fragment_work.xml │ ├── grid_item.xml │ ├── main_activity.xml │ ├── movie_item.xml │ ├── root.xml │ ├── scene_myself_1.xml │ ├── scene_myself_2.xml │ ├── scene_scene1.xml │ ├── scene_scene2.xml │ └── text_item.xml │ ├── menu │ ├── menu_details.xml │ ├── menu_first.xml │ ├── menu_main.xml │ ├── menu_movies.xml │ └── menu_thanks.xml │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── mipmap-mdpi │ └── ic_launcher.png │ ├── mipmap-xhdpi │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ ├── raw │ ├── video1.mp4 │ ├── video2.mp4 │ ├── video3.mp4 │ ├── video4.mp4 │ ├── video5.mp4 │ ├── video6.mp4 │ ├── video7.mp4 │ └── video8.mp4 │ ├── transition │ ├── explode.xml │ ├── fade.xml │ ├── from_details.xml │ ├── move.xml │ ├── move_arc.xml │ ├── move_path.xml │ ├── no_transition.xml │ ├── scene_transition.xml │ ├── slide_bottom.xml │ ├── slide_left.xml │ ├── slide_right.xml │ ├── slide_top.xml │ └── to_details.xml │ ├── values-w820dp │ └── dimens.xml │ └── values │ ├── attrs.xml │ ├── colors.xml │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── build.gradle ├── fromthistothat.apk ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | *.iml 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | From This To That – A deep dive into the TransitionManager and Activity Transitions 2 | ====== 3 | 4 | Aplicativo apresentação da Palestra "From This To That – A deep dive into the TransitionManager and Activity Transitions" na Android Dev Conference 2015 5 | 6 | Esse aplicativo foi feito exclusivamente para o tablet Nexus 9 (mudando a resolução para 1024x768) rodando Android 5.1. 7 | 8 | Minha sugestão, se você não tem um Nexus 9, é usar o [genymotion.com](http://genymotion.com) e ajustar a resolução para 1024x768 9 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | jcenter() 4 | } 5 | dependencies { 6 | classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' 7 | } 8 | } 9 | 10 | apply plugin: 'com.android.application' 11 | apply plugin: 'com.neenbedankt.android-apt' 12 | 13 | android { 14 | compileSdkVersion 23 15 | buildToolsVersion "23.0.0" 16 | 17 | defaultConfig { 18 | applicationId "com.luciofm.presentation.droiconit" 19 | minSdkVersion 21 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(dir: 'libs', include: ['*.jar']) 34 | 35 | compile 'com.jakewharton:butterknife:6.1.0' 36 | compile 'commons-io:commons-io:2.4' 37 | compile 'net.frakbot:jumpingbeans:1.0-SNAPSHOT@aar' 38 | compile 'com.squareup.picasso:picasso:2.5.2' 39 | compile 'com.android.support:palette-v7:23.0.0' 40 | compile 'com.android.support:gridlayout-v7:23.0.0' 41 | compile 'org.parceler:parceler-api:0.2.15' 42 | apt "org.parceler:parceler:0.2.15" 43 | } 44 | -------------------------------------------------------------------------------- /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/luciofm/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 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 13 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 32 | 33 | 36 | 37 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/assets/fonts/YanoneKaffeesatz-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luciofm/AndroidDevConf2015/e1d4d7983b0e7b7f33ec5a5b4bffa39657c8f08c/app/src/main/assets/fonts/YanoneKaffeesatz-Bold.ttf -------------------------------------------------------------------------------- /app/src/main/assets/fonts/YanoneKaffeesatz-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luciofm/AndroidDevConf2015/e1d4d7983b0e7b7f33ec5a5b4bffa39657c8f08c/app/src/main/assets/fonts/YanoneKaffeesatz-Light.ttf -------------------------------------------------------------------------------- /app/src/main/assets/fonts/YanoneKaffeesatz-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luciofm/AndroidDevConf2015/e1d4d7983b0e7b7f33ec5a5b4bffa39657c8f08c/app/src/main/assets/fonts/YanoneKaffeesatz-Regular.ttf -------------------------------------------------------------------------------- /app/src/main/assets/fonts/YanoneKaffeesatz-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luciofm/AndroidDevConf2015/e1d4d7983b0e7b7f33ec5a5b4bffa39657c8f08c/app/src/main/assets/fonts/YanoneKaffeesatz-Thin.ttf -------------------------------------------------------------------------------- /app/src/main/assets/source/activity_transitions.java: -------------------------------------------------------------------------------- 1 | 2 | view.setTransitionName("shared_hero"); 3 | 4 | Intent intent = new Intent(getActivity(), MovieDetailsActivity.class); 5 | 6 | ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(this, hero, "shared_hero"); 7 | 8 | startActivity(intent, options.toBundle()); 9 | -------------------------------------------------------------------------------- /app/src/main/assets/source/activity_transitions.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |   view.setTransitionName("shared_hero");
14 |
15 |   Intent intent = new Intent(getActivity(), MovieDetailsActivity.class);
16 |
17 |   ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(this, hero, "shared_hero");
18 |
19 |   startActivity(intent, options.toBundle());
20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/assets/source/activity_transitions.xml: -------------------------------------------------------------------------------- 1 | true 3 | @android:transition/move 5 | -------------------------------------------------------------------------------- /app/src/main/assets/source/activity_transitions.xml.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |   <item
13 |     name="android:windowActivityTransitions">true</item>
14 |   <item
15 |     name="android:windowSharedElementEnterTransition">@android:transition/move</item>
16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/assets/source/activity_transitions_methods.java: -------------------------------------------------------------------------------- 1 | set{Enter,Exit,Return,Reenter}Transition(); 2 | 3 | setSharedElement{Enter,Exit,Return,Reenter}Transition(); -------------------------------------------------------------------------------- /app/src/main/assets/source/activity_transitions_methods.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |   set{Enter,Exit,Return,Reenter}Transition();
13 |
14 |   setSharedElement{Enter,Exit,Return,Reenter}Transition();
15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/assets/source/anim1.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |   // Animate the size and position of the Image...
13 |   image.animate().setDuration(duration)
14 |     .scaleX(1).scaleY(1)
15 |     .translationX(0).translationY(0)
16 |     .setInterpolator(sDecelerator)
17 |     .setListener(new SimpleAnimatorListener() {
18 |       @Override
19 |       public void onAnimationEnd(Animator animation) {
20 |         // Slide up the text...
21 |         text1.setTranslationY(text1.getHeight());
22 |         text1.animate().setDuration(duration / 2)
23 |             .translationY(0).alpha(1)
24 |             .setInterpolator(sDecelerator);
25 |       }
26 |   });
27 |
28 |   ObjectAnimator bgAnim = ObjectAnimator.ofInt(background, "alpha"0255);
29 |   bgAnim.setDuration(duration * 2);
30 |   bgAnim.start();
31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/assets/source/at2_called.java: -------------------------------------------------------------------------------- 1 | 2 | // Called Activity 3 | slide = new Slide(Gravity.RIGHT); 4 | fade = new Fade(); 5 | slide.addTarget(R.id.imagesHeader); 6 | set = new TransitionSet(); 7 | set.addTransition(slide).addTransition(fade); 8 | getWindow().setEnterTransition(set); 9 | -------------------------------------------------------------------------------- /app/src/main/assets/source/at2_called.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | // Called Activity
14 | slide = new Slide(Gravity.RIGHT);
15 | fade = new Fade();
16 | slide.addTarget(R.id.imagesHeader);
17 | set = new TransitionSet();
18 | set.addTransition(slide).addTransition(fade);
19 | getWindow().setEnterTransition(set);
20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/assets/source/at2_calling.java: -------------------------------------------------------------------------------- 1 | 2 | // Calling Activity 3 | set = new TransitionSet(); 4 | fade = new Fade(); 5 | slide = new Slide(Gravity.BOTTOM); 6 | propagation = new CircularPropagation(); 7 | propagation.setPropagationSpeed(1f); 8 | set.addTransition(fade).addTransition(slide); 9 | set.setPropagation(propagation); 10 | set.setOrdering(ORDERING_TOGETHER); 11 | getWindow().setExitTransition(set); 12 | -------------------------------------------------------------------------------- /app/src/main/assets/source/at2_calling.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | // Calling Activity
14 | set = new TransitionSet();
15 | fade = new Fade();
16 | slide = new Slide(Gravity.BOTTOM);
17 | propagation = new CircularPropagation();
18 | propagation.setPropagationSpeed(1f);
19 | set.addTransition(fade).addTransition(slide);
20 | set.setPropagation(propagation);
21 | set.setOrdering(ORDERING_TOGETHER);
22 | getWindow().setExitTransition(set);
23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/assets/source/at3_called.java: -------------------------------------------------------------------------------- 1 | 2 | // Called Activity 3 | getWindow().setEnterTransition( 4 | TransitionInflater.from(this) 5 | .inflateTransition(R.transition.slide_bottom)); 6 | getWindow().setReturnTransition( 7 | TransitionInflater.from(this) 8 | .inflateTransition(R.transition.explode)); -------------------------------------------------------------------------------- /app/src/main/assets/source/at3_called.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | // Called Activity
14 | getWindow().setEnterTransition(
15 |         TransitionInflater.from(this)
16 |             .inflateTransition(R.transition.slide_bottom));
17 | getWindow().setReturnTransition(
18 |         TransitionInflater.from(this)
19 |             .inflateTransition(R.transition.explode));
20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/assets/source/at3_calling.java: -------------------------------------------------------------------------------- 1 | 2 | // Calling Activity 3 | explode = new Explode(); 4 | propagation = new CircularPropagation(); 5 | propagation.setPropagationSpeed(1f); 6 | explode.setPropagation(propagation); 7 | getWindow().setReenterTransition(explode); 8 | getWindow().setExitTransition(explode); 9 | -------------------------------------------------------------------------------- /app/src/main/assets/source/at3_calling.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | // Calling Activity
14 | explode = new Explode();
15 | propagation = new CircularPropagation();
16 | propagation.setPropagationSpeed(1f);
17 | explode.setPropagation(propagation);
18 | getWindow().setReenterTransition(explode);
19 | getWindow().setExitTransition(explode);
20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/assets/source/at4_called.java: -------------------------------------------------------------------------------- 1 | 2 | // Called Activity 3 | slide = new Slide(Gravity.RIGHT); 4 | propagation = new CircularPropagation(); 5 | propagation.setPropagationSpeed(1f); 6 | getWindow().setEnterTransition(slide); 7 | getWindow().setReturnTransition(slide); 8 | -------------------------------------------------------------------------------- /app/src/main/assets/source/at4_called.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | // Called Activity
14 | slide = new Slide(Gravity.RIGHT);
15 | propagation = new CircularPropagation();
16 | propagation.setPropagationSpeed(1f);
17 | getWindow().setEnterTransition(slide);
18 | getWindow().setReturnTransition(slide);
19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/assets/source/at4_calling.java: -------------------------------------------------------------------------------- 1 | 2 | // Calling Activity 3 | slide = new Slide(Gravity.LEFT); 4 | propagation = new CircularPropagation(); 5 | propagation.setPropagationSpeed(1f); 6 | slide.setPropagation(propagation); 7 | getWindow().setExitTransition(slide); 8 | getWindow().setReenterTransition(slide); 9 | -------------------------------------------------------------------------------- /app/src/main/assets/source/at4_calling.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | // Calling Activity
14 | slide = new Slide(Gravity.LEFT);
15 | propagation = new CircularPropagation();
16 | propagation.setPropagationSpeed(1f);
17 | slide.setPropagation(propagation);
18 | getWindow().setExitTransition(slide);
19 | getWindow().setReenterTransition(slide);
20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/assets/source/at5_called.java: -------------------------------------------------------------------------------- 1 | 2 | // Called Activity 3 | slide = new Slide(Gravity.BOTTOM); 4 | slide2 = new Slide(Gravity.TOP); 5 | getWindow().setEnterTransition(slide); 6 | getWindow().setReturnTransition(slide2); -------------------------------------------------------------------------------- /app/src/main/assets/source/at5_called.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | // Called Activity
14 | slide = new Slide(Gravity.BOTTOM);
15 | slide2 = new Slide(Gravity.TOP);
16 | getWindow().setEnterTransition(slide);
17 | getWindow().setReturnTransition(slide2);
18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/assets/source/at5_calling.java: -------------------------------------------------------------------------------- 1 | 2 | // Calling Activity 3 | getWindow().setExitTransition( 4 | inflater.inflateTransition(R.transition.slide_top)); 5 | 6 | getWindow().setReenterTransition( 7 | inflater.inflateTransition(R.transition.slide_bottom)); -------------------------------------------------------------------------------- /app/src/main/assets/source/at5_calling.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | // Calling Activity
14 | getWindow().setExitTransition(
15 |         inflater.inflateTransition(R.transition.slide_top));
16 |
17 | getWindow().setReenterTransition(
18 |         inflater.inflateTransition(R.transition.slide_bottom));
19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/assets/source/at6_calling.java: -------------------------------------------------------------------------------- 1 | 2 | // Calling Activity 3 | Pop pop = new Pop(false); 4 | getWindow().setReenterTransition(pop); 5 | -------------------------------------------------------------------------------- /app/src/main/assets/source/at6_calling.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | // Calling Activity
14 | Pop pop = new Pop(false);
15 | getWindow().setReenterTransition(pop);
16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/assets/source/auto.java: -------------------------------------------------------------------------------- 1 | public class AutoTransition extends TransitionSet { 2 | public AutoTransition() { 3 | setOrdering(ORDERING_SEQUENTIAL); 4 | addTransition(new Fade(Fade.OUT)). 5 | addTransition(new ChangeBounds()). 6 | addTransition(new Fade(Fade.IN)); 7 | } 8 | } -------------------------------------------------------------------------------- /app/src/main/assets/source/auto.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | public class AutoTransition extends TransitionSet {
13 |     public AutoTransition() {
14 |         setOrdering(ORDERING_SEQUENTIAL);
15 |         addTransition(new Fade(Fade.OUT)).
16 |                 addTransition(new ChangeBounds()).
17 |                 addTransition(new Fade(Fade.IN));
18 |     }
19 | }
20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/assets/source/build.gradle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | defaultConfig {
13 |     minSdkVersion 15
14 |     targetSdkVersion 21
15 | }
16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/assets/source/custom1.java: -------------------------------------------------------------------------------- 1 | TransitionSet set = new TransitionSet(); 2 | set.setOrdering(TransitionSet.ORDERING_SEQUENTIAL); 3 | Pop pop = new Pop(); 4 | pop.setPropagation(new CircularPropagation()); 5 | pop.setEpicenterCallback(new Transition.EpicenterCallback() { 6 | @Override 7 | public Rect onGetEpicenter(Transition transition) { 8 | container3.getLocationOnScreen(loc); 9 | return new Rect(loc[0], loc[1], loc[0] + container3.getWidth(), loc[1] + 40); 10 | } 11 | }); 12 | 13 | set.addTransition(new ChangeBounds()).addTransition(pop); 14 | TransitionManager.beginDelayedTransition(container3, set); 15 | -------------------------------------------------------------------------------- /app/src/main/assets/source/custom1.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |   TransitionSet set = new TransitionSet();
13 |   set.setOrdering(TransitionSet.ORDERING_SEQUENTIAL);
14 |   Pop pop = new Pop();
15 |   pop.setPropagation(new CircularPropagation());
16 |   pop.setEpicenterCallback(new Transition.EpicenterCallback() {
17 |     @Override
18 |     public Rect onGetEpicenter(Transition transition) {
19 |       container3.getLocationOnScreen(loc);
20 |       return new Rect(loc[0], loc[1], loc[0] + container3.getWidth(), loc[1] + 40);
21 |     }
22 |   });
23 |
24 |   set.addTransition(new ChangeBounds()).addTransition(pop);
25 |   TransitionManager.beginDelayedTransition(container3, set);
26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/assets/source/custom2.java: -------------------------------------------------------------------------------- 1 | public class CustomTransition extends Transition { 2 | @Override 3 | public void captureStartValues(TransitionValues transitionValues) { 4 | } 5 | 6 | @Override 7 | public void captureEndValues(TransitionValues transitionValues) { 8 | } 9 | 10 | @Override 11 | public Animator createAnimator(ViewGroup sceneRoot, TransitionValues startValues, TransitionValues endValues) { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/assets/source/custom2.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |   public class CustomTransition extends Transition {
13 |     @Override
14 |     public void captureStartValues(TransitionValues transitionValues) {
15 |     }
16 |
17 |     @Override
18 |     public void captureEndValues(TransitionValues transitionValues) {
19 |     }
20 |
21 |     @Override
22 |     public Animator createAnimator(ViewGroup sceneRoot, TransitionValues startValues, TransitionValues endValues) {
23 |     }
24 |   }
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/assets/source/custom3.java: -------------------------------------------------------------------------------- 1 | public class Pop extends Visibility { 2 | @Override 3 | public Animator onAppear(ViewGroup sceneRoot, View view, TransitionValues startValues, TransitionValues endValues) { 4 | } 5 | 6 | @Override 7 | public Animator onDisappear(ViewGroup sceneRoot, View view, TransitionValues startValues, TransitionValues endValues) { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/assets/source/custom3.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |   public class Pop extends Visibility {
13 |     @Override
14 |     public Animator onAppear(ViewGroup sceneRoot, View view, TransitionValues startValues, TransitionValues endValues) {
15 |     }
16 |
17 |     @Override
18 |     public Animator onDisappear(ViewGroup sceneRoot, View view, TransitionValues startValues, TransitionValues endValues) {
19 |     }
20 |   }
21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/assets/source/custom4.java: -------------------------------------------------------------------------------- 1 | // onAppear... 2 | view.setScaleX(0f); 3 | view.setScaleY(0f); 4 | 5 | PropertyValuesHolder[] pvh = new PropertyValuesHolder[2]; 6 | pvh[0] = PropertyValuesHolder.ofFloat(View.SCALE_X, 1f); 7 | pvh[1] = PropertyValuesHolder.ofFloat(View.SCALE_Y, 1f); 8 | 9 | ObjectAnimator anim = ObjectAnimator.ofPropertyValuesHolder(view, pvh); 10 | anim.setInterpolator(new OvershootInterpolator()); 11 | 12 | return anim; 13 | -------------------------------------------------------------------------------- /app/src/main/assets/source/custom4.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |   // onAppear...
13 |   view.setScaleX(0f);
14 |   view.setScaleY(0f);
15 |
16 |   PropertyValuesHolder[] pvh = new PropertyValuesHolder[2];
17 |   pvh[0] = PropertyValuesHolder.ofFloat(View.SCALE_X, 1f);
18 |   pvh[1] = PropertyValuesHolder.ofFloat(View.SCALE_Y, 1f);
19 |
20 |   ObjectAnimator anim = ObjectAnimator.ofPropertyValuesHolder(view, pvh);
21 |   anim.setInterpolator(new OvershootInterpolator());
22 |
23 |   return anim;
24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/assets/source/delayed.java: -------------------------------------------------------------------------------- 1 | // Showing register fields... 2 | TransitionManager.beginDelayedTransition(regContainer); 3 | 4 | editUsername.setVisibility(View.VISIBLE); 5 | editPass.setVisibility(View.VISIBLE); 6 | editPass2.setVisibility(View.VISIBLE); 7 | buttonReg.setVisibility(View.VISIBLE); 8 | 9 | // Hiding it... 10 | TransitionManager.beginDelayedTransition(regContainer); 11 | editUsername.setVisibility(View.GONE); 12 | editPass.setVisibility(View.GONE); 13 | ... 14 | -------------------------------------------------------------------------------- /app/src/main/assets/source/delayed.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |   // Showing register fields...
13 |   TransitionManager.beginDelayedTransition(regContainer);
14 |
15 |   editUsername.setVisibility(View.VISIBLE);
16 |   editPass.setVisibility(View.VISIBLE);
17 |   editPass2.setVisibility(View.VISIBLE);
18 |   buttonReg.setVisibility(View.VISIBLE);
19 |
20 |   // Hiding it...
21 |   TransitionManager.beginDelayedTransition(regContainer);
22 |   editUsername.setVisibility(View.GONE);
23 |   editPass.setVisibility(View.GONE);
24 |   ...
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/assets/source/delayed2.java: -------------------------------------------------------------------------------- 1 | TransitionManager.beginDelayedTransition(regContainer, 2 | new AutoTransition()); 3 | 4 | // AutoTransition 5 | TransitionSet set = new TransitionSet(); 6 | set.setOrdering(ORDERING_SEQUENTIAL); 7 | set.addTransition(new Fade(Fade.OUT)) 8 | .addTransition(new ChangeBounds()) 9 | .addTransition(new Fade(Fade.IN)); 10 | -------------------------------------------------------------------------------- /app/src/main/assets/source/delayed2.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |   TransitionManager.beginDelayedTransition(regContainer,
13 |                                   new AutoTransition());
14 |
15 |   // AutoTransition
16 |   TransitionSet set = new TransitionSet();
17 |   set.setOrdering(ORDERING_SEQUENTIAL);
18 |   set.addTransition(new Fade(Fade.OUT))
19 |      .addTransition(new ChangeBounds())
20 |      .addTransition(new Fade(Fade.IN));
21 |
22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/assets/source/from_details.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/assets/source/from_details.xml.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | <!-- from_details.xml -->
13 | <transitionSet transitionOrdering="sequential">
14 |   <transitionSet>
15 |     <fade android:fadingMode="fade_in" />
16 |     <targets>
17 |       <target android:excludeId="@id/checkMark" />
18 |     </targets>
19 |   </transitionSet>
20 |   <transitionSet transitionOrdering="together">
21 |     <changeImageTransform />
22 |     <changeBounds />
23 |   </transitionSet>
24 |   <fade android:fadingMode="fade_in" />
25 | </transitionSet>
26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/assets/source/init.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |   // Set initial position and size on the Image
13 |   // where we will animate to the final state......
14 |   image.setPivotX(0);
15 |   image.setPivotY(0);
16 |   image.setScaleX(widthScale);
17 |   image.setScaleY(heightScale);
18 |   image.setTranslationX(leftDelta);
19 |   image.setTranslationY(topDelta);
20 |
21 |   // Later we animate the content text...
22 |   text1.setAlpha(0);
23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/assets/source/itemclick.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | public class ViewInfo {
13 |     public int left;
14 |     public int top;
15 |     public int width;
16 |     public int height;
17 | }
18 |
19 | @Override
20 | public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
21 |     Dog dog = (Dog) view.getTag();
22 |     ViewInfo info = new ViewInfo(view);
23 |
24 |     Intent intent = new Intent(getActivity(), TransitionActivity.class);
25 |     intent.putExtra("DOG", dog);
26 |     intent.putExtra("INFO", info);
27 |     startActivity(intent);
28 |     getActivity().overridePendingTransition(00);
29 | }
30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/assets/source/ltransition1.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | // getView on Adapter
14 | view.setTransitionName(dog.getname());
15 |
16 | // OnItemClickListener
17 | Dog dog = (Dog) view.getTag();
18 |
19 | Intent intent = new Intent(this,
20 |         LTransitionActivity.class);
21 | intent.putExtra("DOG", dog);
22 |
23 | ActivityOptions options; =
24 | options = ActivityOptions
25 |              .makeSceneTransitionAnimation(this,
26 |                              view, "photo_hero");
27 | startActivity(intent, options.toBundle());
28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/assets/source/ltransition2.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 | // onCreate
15 | dog = getIntent.getExtras().getParcelable("DOG");
16 |
17 | getWindow().getEnterTransition()
18 |         .addListener(new TransitionAdapter() {
19 |   @Override
20 |   public void onTransitionEnd(Transition transition) {
21 |     animTextIn();
22 |     getWindow().getEnterTransition()
23 |         .removeListener(this);
24 |   }
25 | });
26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/assets/source/ltransition3.java.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |   public void animateTextIn() {
15 |     final long duration = Utils.ANIM_DURATION;
16 |     text1.setVisibility(View.VISIBLE);
17 |     text1.setAlpha(0);
18 |     text1.setTranslationY(text1.getHeight());
19 |     text1.animate().setDuration(duration / 2)
20 |          .translationY(0).alpha(1)
21 |          .setInterpolator(sDecelerator);
22 |   }
23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/assets/source/morph.xml: -------------------------------------------------------------------------------- 1 | 3 | 5 | 6 | 7 | 8 | 9 |