避免动画自动“展开”?
我有一个简单的视图动画,但我看不到“摆脱”动画“展开”(而且我似乎无法在网上找到解决方案)。
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator"
android:shareInterpolator="true" >
<scale
android:duration="250"
android:fromXScale="1"
android:fromYScale="1"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="0"
android:toXScale="1.1"
android:toYScale="1.1" />
</set>
简而言之,它的作用是从中间按比例将视图膨胀 10%。
但是,当它执行时,它会膨胀,而当它到达末尾时,它又会收缩。 我想避免这种情况——“放松”效应——当它从 110% 缩小到 100% 时。 那怎么办呢?
编辑:
我简单地以此开始:
Animation animation1 = AnimationUtils.loadAnimation(this, R.anim.<name>);
v.startAnimation(animation1);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正确的答案可以在这里找到:如何在 Android 中对视图进行动画处理并让它保持在新的位置/大小?
它将:放在
The correct answer is found here: How can I animate a view in Android and have it stay in the new position/size?
It is putting this:
inside the
<set
tag.