开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜