Start Activity with an animation

Posted by adityad on Stack Overflow See other posts from Stack Overflow or by adityad
Published on 2010-04-12T22:09:34Z Indexed on 2010/04/12 22:12 UTC
Read the original article Hit count: 404

Filed under:
|
|
|
|

I am trying to start an activity with a custom transition animation. The only way I have found out so far to do this (without using onPendingTransition() in the previous activity) is to use a custom theme on the activity and define either activityOpenEnterAnimation, taskOpenEnterAnimation, windowEnterAnimation or windowAnimationStyle to set the animation. But, none of these attributes are working for me. Some experimentation yielded the following results-

If I set the windowAnimationStyle attribute to some custom style which defines values for activityOpenEnterAnimation, taskOpenEnterAnimation, windowEnterAnimation or windowAnimationStyle I can get rid of the default transition animation occurring at the start of the activity. It doesn't show the transition animation using the actual value specified but at least the default animation is not shown.

According to the reference doc here,

http://developer.android.com/reference/android/R.attr.html

I should be able to define an animation at the start of the activity using activityOpenEnterAnimation. But no success so far.

Any ideas?

© Stack Overflow or respective owner

Related posts about android

Related posts about animation