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.view.View;

import android.view.animation.DecelerateInterpolator;

public class Main {
    public static void translationX(View view, int translationX, int duration, int startDelay) {
        view.animate().translationX(translationX).setDuration(duration)
                .setInterpolator(new DecelerateInterpolator()).setStartDelay(startDelay);

    }

    public static void translationX(View view, int translationX, int duration, int startDelay,
            Animator.AnimatorListener listener) {
        view.animate().translationX(translationX).setDuration(duration).setStartDelay(startDelay)
                .setListener(listener);
    }
}