Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.view.View;

public class Main {
    public static AnimatorSet getScaleAnimator(View view, float startScale, float endScale) {
        AnimatorSet set = new AnimatorSet();
        ObjectAnimator scaleXAnimator = ObjectAnimator.ofFloat(view, View.SCALE_X, startScale, endScale);
        ObjectAnimator scaleYAnimator = ObjectAnimator.ofFloat(view, View.SCALE_Y, startScale, endScale);
        set.playTogether(scaleXAnimator, scaleYAnimator);
        return set;
    }
}