我如何动画在Android中的视图,并让它停留在新的位置/大小? [英] How can I animate a view in Android and have it stay in the new position/size?
问题描述
我现在有一个观点在我的Android应用程序,视图是玩帧动画。我想动画视图以增加它的大小为150%。当我申请一个规模的动画给它,规模动画完成后,我想认为留在该活动的生命周期的其余部分是新的大小。不幸的是,现在当比例尺向上动画完成,视图弹回原来的大小。我怎样才能得到它,以保持新的动画tranformation?
我用
myView.startAnimation(AnimationUtils.loadAnimation(mContext,R.anim.scaleUp150));
谢谢!
fillAfter =真
fillEnabled =真
I currently have a view in my Android app and the view is playing a frame animation. I want to animate the view to increase its size to 150%. When I apply a scale animation to it, and the scale animation is completed, I want the view to stay at that new size for the rest of the activity's life cycle. Unfortunately right now when the scale up animation is complete, the view snaps back to the original size. How can I get it to keep the new animated tranformation?
I'm using
myView.startAnimation(AnimationUtils.loadAnimation(mContext,R.anim.scaleUp150));
Thanks!
fillAfter=true
fillEnabled=true
这篇关于我如何动画在Android中的视图,并让它停留在新的位置/大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!