Java tutorial
//package com.java2s; import android.animation.ObjectAnimator; import android.view.View; public class Main { private static final String SCALE_X = "scaleX"; public static ObjectAnimator scaleX(View view, int duration) { ObjectAnimator animator = ObjectAnimator.ofFloat(view, SCALE_X, 1f, 2f, 1f); animator.setDuration(duration); return animator; } }