android start activity with animation
Is it possible to ad an animation to an activity at runtime so when I start the activity, it starts with my animation? I want to specify s开发者_开发百科ome parameters to animation at runtime depending on some view's position. I've managed to ad an animation, but the animation was defined in a xml file so I was not able to edit the numbers from animation. Is it possible to do this?
You could define your animation in code instead of the XML file. For example here it is explained how to do that. THen you can change things at runtime by using variables.
Yes,
you can always use the android activity life cycle to do this, in this case you can perform your animation in the onCreate function.
Cheers.
精彩评论