Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.view.View;

public class Main {
    public static void slowViewAnimation(View view) {
        ObjectAnimator translationY = ObjectAnimator.ofFloat(view, View.TRANSLATION_Y, -200f, 0f);
        translationY.setDuration(5000);
        AnimatorSet translateSlowly = new AnimatorSet();
        translateSlowly.playTogether(translationY);
        translateSlowly.start();
    }
}