Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    public static void slideFromLeftToRight(View view) {
        ObjectAnimator animator = ObjectAnimator.ofFloat(view, "X", -2000, 0).setDuration(1000);

        animator.setInterpolator(new LinearInterpolator());

        animator.start();
    }
}