Tabnine Logo
PathInterpolator.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
android.view.animation.PathInterpolator
constructor

Best Java code snippets using android.view.animation.PathInterpolator.<init> (Showing top 11 results out of 315)

origin: ybq/Android-SpinKit

  @TargetApi(Build.VERSION_CODES.LOLLIPOP)
  public static Interpolator create(float controlX1, float controlY1,
                   float controlX2, float controlY2) {
    return new PathInterpolator(controlX1, controlY1, controlX2, controlY2);
  }
}
origin: ybq/Android-SpinKit

@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public static Interpolator create(Path path) {
  return new PathInterpolator(path);
}
origin: ybq/Android-SpinKit

@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public static Interpolator create(float controlX, float controlY) {
  return new PathInterpolator(controlX, controlY);
}
origin: Zomato/AndroidPhotoFilters

private static int[] getOutputPointsForNewerDevices(Point[] knots) {
  Point[] controlPoints = calculateControlPoints(knots);
  Path path = new Path();
  path.moveTo(0, 0);
  path.lineTo(knots[0].x / 255.0f, knots[0].y / 255.0f);
  path.moveTo(knots[0].x / 255.0f, knots[0].y / 255.0f);
  for (int index = 1; index < knots.length; index++) {
    path.quadTo(
        controlPoints[index - 1].x / 255.0f,
        controlPoints[index - 1].y / 255.0f,
        knots[index].x / 255.0f,
        knots[index].y / 255.0f
    );
    path.moveTo(knots[index].x / 255.0f, knots[index].y / 255.0f);
  }
  path.lineTo(1, 1);
  path.moveTo(1, 1);
  float[] allPoints = new float[256];
  for (int x = 0; x < 256; x++) {
    PathInterpolator pathInterpolator = new PathInterpolator(path);
    allPoints[x] = 255.0f * pathInterpolator.getInterpolation((float) x / 255.0f);
  }
  allPoints[0] = knots[0].y;
  allPoints[255] = knots[knots.length - 1].y;
  return validateCurve(allPoints);
}
origin: google/android-ui-toolkit-demos

private void setupPathInterpolator() {
  if (mQuadraticPath) {
    mInterpolator = new PathInterpolator(mCx1, mCy1);
    if (mPathCallback != null) {
      mPathCallback.onControlPoint1Moved(mCx1, mCy1);
    }
  } else if (mCubicPath) {
    mInterpolator = new PathInterpolator(mCx1, mCy1, mCx2, mCy2);
    if (mPathCallback != null) {
      mPathCallback.onControlPoint1Moved(mCx1, mCy1);
      mPathCallback.onControlPoint2Moved(mCx2, mCy2);
    }
  }
  invalidate();
}
origin: enricocid/LaunchEnr

private Interpolator getInterpolator(float startGradient, float velocityFactor) {
  if (startGradient != mCachedStartGradient
      || velocityFactor != mCachedVelocityFactor) {
    float speedup = mSpeedUpFactor * (1.0f - velocityFactor);
    mInterpolator = new PathInterpolator(speedup,
        speedup * startGradient,
        mLinearOutSlowInX2, mY2);
    mCachedStartGradient = startGradient;
    mCachedVelocityFactor = velocityFactor;
  }
  return mInterpolator;
}
origin: flipkart-incubator/proteus

 @TargetApi(Build.VERSION_CODES.LOLLIPOP)
 Interpolator createInterpolator(Context c) {
  if (null != controlX2 && null != controlY2) {
   return new PathInterpolator(controlX1, controlY1, controlX2, controlY2);
  } else {
   return new PathInterpolator(controlX1, controlY1);
  }
 }
}
origin: cdflynn/checkview

private Interpolator createCheckInterpolatorCompat() {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    return new PathInterpolator(0.755F, 0.05F, 0.855F, 0.06F);
  } else {
    return new AccelerateInterpolator();
  }
}
origin: geniusgithub/AndroidDialer

public static Interpolator create(float controlX1, float controlY1,
    float controlX2, float controlY2) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    return new PathInterpolator(controlX1, controlY1, controlX2, controlY2);
  }
  return new PathInterpolatorBase(controlX1, controlY1, controlX2, controlY2);
}
origin: enricocid/LaunchEnr

private AnimatorProperties getDismissingProperties(float currValue, float endValue,
    float velocity, float maxDistance) {
  float maxLengthSeconds = (float) (mMaxLengthSeconds
      * Math.pow(Math.abs(endValue - currValue) / maxDistance, 0.5f));
  float diff = Math.abs(endValue - currValue);
  float velAbs = Math.abs(velocity);
  float y2 = calculateLinearOutFasterInY2(velAbs);
  float startGradient = y2 / LINEAR_OUT_FASTER_IN_X2;
  Interpolator mLinearOutFasterIn = new PathInterpolator(0, 0, LINEAR_OUT_FASTER_IN_X2, y2);
  float durationSeconds = startGradient * diff / velAbs;
  if (durationSeconds <= maxLengthSeconds) {
    mAnimatorProperties.interpolator = mLinearOutFasterIn;
  } else if (velAbs >= mMinVelocityPxPerSecond) {
    // Cross fade between linear-out-faster-in and linear interpolator with current
    // velocity.
    durationSeconds = maxLengthSeconds;
    VelocityInterpolator velocityInterpolator
        = new VelocityInterpolator(durationSeconds, velAbs, diff);
    InterpolatorInterpolator superInterpolator = new InterpolatorInterpolator(
        velocityInterpolator, mLinearOutFasterIn, Interpolators.LINEAR_OUT_SLOW_IN);
    mAnimatorProperties.interpolator = superInterpolator;
  } else {
    // Just use a normal interpolator which doesn't take the velocity into account.
    durationSeconds = maxLengthSeconds;
    mAnimatorProperties.interpolator = Interpolators.FAST_OUT_LINEAR_IN;
  }
  mAnimatorProperties.duration = (long) (durationSeconds * 1000);
  return mAnimatorProperties;
}
origin: stackoverflow.com

aset.playSequentially(va1, va2, va3);
aset.setDuration(ANIMATION_DURATION_MS);
aset.setInterpolator(new PathInterpolator(0.75f, 0.1f, 0.25f, 0.9f));
aset.start();
android.view.animationPathInterpolator<init>

Popular methods of PathInterpolator

  • getInterpolation

Popular in Java

  • Making http requests using okhttp
  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • JList (javax.swing)
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now