我需要制作一个基于比例的动画对话框。我希望能够使用弹跳效果,我尝试过使用弹跳插值器。
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="500"
android:fromXScale="0"
android:fromYScale="0"
android:interpolator="@android:anim/bounce_interpolator"
android:toXScale="1"
android:toYScale="1" />
我想修改弹跳效果,让它变得更慢/更快,可以控制弹跳的大小。我没有找到任何现成的东西,尝试了使用代码自行调整。
<set >
<scale
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="500"
android:fromXScale="0"
android:fromYScale="0"
android:toXScale="1"
android:toYScale="1" />
<scale
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="100"
android:fromXScale="1"
android:fromYScale="1"
android:startOffset="500"
android:toXScale=".8"
android:toYScale=".8" />
<scale
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="100"
android:fromXScale=".8"
android:fromYScale=".8"
android:startOffset="600"
android:toXScale="1"
android:toYScale="1" />
</set>
整个动画表现得很奇怪? 所以我的问题是如何通过设置来修复这个动画,或者如何修改bounce_interpolator?