Java tutorial
//package com.java2s; import android.animation.ObjectAnimator; public class Main { private static float y = 0; private static long duration = 1500; public static void moveTop(Object v, int end) { y -= end; ObjectAnimator.ofFloat(v, "translationY", y).setDuration(duration).start(); } }