Android : Animation between activity switching using Theme

In my previous post i have show how to add custom animation between activity switching. There is a problem with that, animation are customized as per our requirement only when activity switching is triggered from our code. You will lose your animation when android framework handles activity switch. For example when you press back button you wont get the desired animation. To overcome this limitation we will use a custom theme which is inherited from android default theme. Then override some default window switching animations.

To create a custom theme add these lines to res/values/style.xml

 

Continue reading Android : Animation between activity switching using Theme

Android : Animation between activity switching

For most of the android apps we do have multiple activities and when we start another activity either we get no animation (in older devices) or  a left-right translation. It is not so cool for a stylish app. We can override these animation in two ways. Here is simplest way  using method “overridePendingTransition”

see the example code for switching between Activity1 and Activity2

Continue reading Android : Animation between activity switching