DevBytes: Window Animations
Why Stack Overflow recommends it
Stack Overflow users link it when answering or asking how to animate activity transitions, including on finish() and with ActivityOptions.
Recommended by 3 people across 3 different months, 2013 to 2013.
What it is
An 8-minute DevBytes episode from the Android Developers channel showing how to build custom window animations that run when moving between activities and sub-activities. It covers overridePendingTransition and ActivityOptions, with a downloadable sample project.
What people said
Recommends ianhanniballake · 2013-02 · Stack Overflow · on “How to animate on finish() via ActivityOptions in Android?”
As explained in the DevBytes: Window Animations [this video] walkthrough, you can replace your Info.class's finish() method with @Override public void finish() { super.finish(); overridePendingTransition(R.anim.ani2, R.anim.ani1); }
Recommends Stephan Branczyk · 2013-03 · Stack Overflow · on “Is it possible to display a view in front of the ActionBar?”
Here is one way to do what you want from Chet Haas. Chet works at Google and wrote the android animation framework. [this video] Chet also has other easier ways you can do the same thing at higher api levels. It's just that I don't have the time to look through all of his presentations/youtube videos.
Recommends MinceMan · 2013-11 · Stack Overflow · on “How to get a reverse animation of ActivityOptions.makeScaleUpAnimation when finishing child activity on android?”
Unforunatly that is currently not possible. Check this video from the android dev blog [this video] . I'm not sure about the duration, you might have to subclass ActivityOptions.
Cites esz · 2013-03 · Stack Overflow · on “android animating switching between activities - windows order”
I'm following this how to DevBytes: Window Animations [this video] to implement translation as an animation when switching between activities. Everything is working fine except animation when user presses back button from SUBACTIVITY to go to MAIN ACTIVITY. When MAIN ACTIVITY slides in it is under the SUBACTIVITY and i would like it be on top of it. I use overridePendingTransition() to create animation when user goes back to MAIN ACTIVITY. overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_right); slide_in_right.xml: <?xml version="1.0" encoding="utf-8"?> <set xmlns:android=" [LINK] "> <translate xmlns:android=" [LINK] " android:fromXDelta="-100%p" android:toXDelta="0" android:dura
Cites Tom Sabel · 2013-09 · Stack Overflow · on “No animation when switching from fragment to activity and back”
My main activity shows the content in fragments. If I press a button an other activity is starting with this line of code: Intent intent = new Intent(context, FragmentActivity.class); Bundle bundle = ActivityOptions.makeCustomAnimation(context, R.anim.slide_in_left, R.anim.slide_out_left).toBundle(); context.startActivity(intent, bundle); So the new activity should slide in and the current activity should slide out. The problem is that the new activity is animated correctly. The current fragment doesn't have an animation. Update This solves the problem but i don't want to finish my activity. finish(); startActivity(intent); overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_lef