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.CycleInterpolator;

public class Main {

    public static void makeSnake(View v) {
        ObjectAnimator snake = ObjectAnimator.ofFloat(v, "translationX", 0, 10).setDuration(300);
        snake.setInterpolator(new CycleInterpolator(2));
        snake.start();
    }
}