Android examples for Animation:Expand Animation
get Appearing Expanding Animation Set
//package com.java2s; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.support.annotation.NonNull; import android.view.View; public class Main { @NonNull//w ww . ja v a 2 s . com public static AnimatorSet getAppearingExpandingSet(View view, long duration) { view.setAlpha(0f); final ObjectAnimator visibilityAnim = ObjectAnimator.ofFloat(view, "alpha", 0f, 1f); visibilityAnim.setDuration(duration); final ObjectAnimator xScaleAnim = ObjectAnimator.ofFloat(view, "scaleX", 0f, 1f); xScaleAnim.setDuration(duration); final ObjectAnimator yScaleAnim = ObjectAnimator.ofFloat(view, "scaleY", 0f, 1f); yScaleAnim.setDuration(duration); final AnimatorSet appearingSet = new AnimatorSet(); appearingSet.play(visibilityAnim).with(xScaleAnim).with(yScaleAnim); return appearingSet; } }