Example usage for android.support.v4.view.animation PathInterpolatorCompat create

List of usage examples for android.support.v4.view.animation PathInterpolatorCompat create

Introduction

In this page you can find the example usage for android.support.v4.view.animation PathInterpolatorCompat create.

Prototype

public static Interpolator create(float controlX, float controlY) 

Source Link

Document

Create an Interpolator for a quadratic Bezier curve.

Usage

From source file:io.github.prefanatic.cleantap.ui.BeerInfoActivity.java

private void setupAnimations() {
    postponeEnterTransition();/*from  ww w  . j  a  va  2 s  . c  o m*/
    Interpolator interpolator = PathInterpolatorCompat.create(0.5f, 0.5f);

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        getWindow().getSharedElementEnterTransition().setInterpolator(interpolator);
        getWindow().getSharedElementExitTransition().setInterpolator(interpolator);
    }
}

From source file:com.savvasdalkitsis.betwixt.Interpolators.java

/**
 * <strong>ANDROID INTERPOLATOR</strong><br/><br/>
 * Create an Interpolator for a quadratic Bezier curve. The end points (0, 0) and (1, 1) are assumed.
 * @param controlX the x coordinate of the quadratic Bezier control point
 * @param controlY the y coordinate of the quadratic Bezier control point
 *///from   w  w  w.  ja  va 2 s  .co  m
@NonNull
public static Interpolator path(int controlX, int controlY) {
    return PathInterpolatorCompat.create(controlX, controlY);
}