Android动画:改变速度

时间:2017-01-13 12:02:49

标签: android animation

我在Android中实现了一个动画。 这是xml:

<?xml version="1.0" encoding="utf-8"?>
<set
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/linear_interpolator"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillAfter="true">

    <translate
        android:fromXDelta="-4%p"
        android:toXDelta="4%p"
        android:repeatCount="2"
        android:repeatMode="reverse"
        android:duration="1000" />
</set>

但移动的速度有点慢。如何提高速度?
我也尝试了accelerate_interpolator,但它太慢......

由于

PS:我想做的动作就像是一把刀。 所以我想把它提前一段时间推迟。

1 个答案:

答案 0 :(得分:0)

减少你面前的结果持续时间。

{{1}}