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 makeClick(View v) {
        ObjectAnimator clickX = ObjectAnimator.ofFloat(v, "scaleX", 1, 0.7f, 1).setDuration(100);
        ObjectAnimator clickY = ObjectAnimator.ofFloat(v, "scaleY", 1, 0.7f, 1).setDuration(100);
        AnimatorSet click = new AnimatorSet();
        click.playTogether(clickX, clickY);
        click.start();
    }
}