View translate animation - Android android.view.animation

Android examples for android.view.animation:Translate Animation

Description

View translate animation

Demo Code

import android.view.View;

public class Main{

    public static void translate(View view, int transX, int transY,
            int duration, int startDelay) {
        view.animate().translationX(transX).translationY(transY)
                .setDuration(duration).setStartDelay(startDelay);
    }/* www . j a  v  a 2s  .  c o m*/

}

Related Tutorials