move Down ObjectAnimator - Android android.animation

Android examples for android.animation:ObjectAnimator

Description

move Down ObjectAnimator

Demo Code


//package com.java2s;
import android.animation.ObjectAnimator;

public class Main {
    private static float y = 0;
    private static long duration = 1500;

    public static void moveDown(Object v, int end) {
        y += end;//from  w w  w .j  ava 2 s .c  o m
        ObjectAnimator.ofFloat(v, "translationY", y).setDuration(duration)
                .start();
    }
}

Related Tutorials