Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

import android.animation.ObjectAnimator;

import android.view.View;

public class Main {

    public static Animator doMoveVertical(View view, int startY, int endY, int duration) {
        ObjectAnimator animator = ObjectAnimator.ofFloat(view, "translationY", startY, endY).setDuration(duration);
        animator.start();
        return animator;
    }
}