Android examples for Animation:Scale Animation
start Scale With Bubble
//package com.java2s; import android.animation.ObjectAnimator; import android.animation.PropertyValuesHolder; import android.view.View; import android.view.animation.BounceInterpolator; public class Main { public static void startScaleWithBubble(View bubbleView, boolean isActive) { float coefficient = isActive ? 0.0f : 1.0f; bubbleView.setPivotY(bubbleView.getHeight()); ObjectAnimator scale = ObjectAnimator.ofPropertyValuesHolder( bubbleView,/*from w w w. jav a 2s .co m*/ PropertyValuesHolder.ofFloat("scaleX", coefficient), PropertyValuesHolder.ofFloat("scaleY", coefficient)); scale.setDuration(bubbleView.getResources().getInteger( android.R.integer.config_longAnimTime)); scale.setInterpolator(new BounceInterpolator()); scale.start(); } }