get Material Interpolator - Android android.view.animation

Android examples for android.view.animation:Animation

Description

get Material Interpolator

Demo Code

import android.content.Context;
import android.view.animation.Interpolator;

public class Main {

  private static Interpolator gusterpolator;

  public static Interpolator getMaterialInterpolator(Context ctx) {
    if (gusterpolator == null) {
      synchronized (Main.class) {
        if (gusterpolator == null) {
          gusterpolator = android.view.animation.AnimationUtils.loadInterpolator(ctx,
              android.R.interpolator.fast_out_slow_in);
        }//from  w  w w.  j a  v  a  2s .  c  o m
      }
    }
    return gusterpolator;
  }

}

Related Tutorials