Tabnine Logo
AccelerateInterpolator.getInterpolation
Code IndexAdd Tabnine to your IDE (free)

How to use
getInterpolation
method
in
android.view.animation.AccelerateInterpolator

Best Java code snippets using android.view.animation.AccelerateInterpolator.getInterpolation (Showing top 14 results out of 351)

origin: iielse/ImageWatcher

  @Override
  public Integer evaluate(float fraction, Integer startValue, Integer endValue) {
    float f = accelerateInterpolator.getInterpolation(fraction);
    int startColor = startValue;
    int endColor = endValue;
    int alpha = (int) (Color.alpha(startColor) + f * (Color.alpha(endColor) - Color.alpha(startColor)));
    int red = (int) (Color.red(startColor) + f * (Color.red(endColor) - Color.red(startColor)));
    int green = (int) (Color.green(startColor) + f * (Color.green(endColor) - Color.green(startColor)));
    int blue = (int) (Color.blue(startColor) + f * (Color.blue(endColor) - Color.blue(startColor)));
    return Color.argb(alpha, red, green, blue);
  }
};
origin: byc4426/ImageWatcher

  @Override
  public Integer evaluate(float fraction, Integer startValue, Integer endValue) {
    float f = accelerateInterpolator.getInterpolation(fraction);
    int startColor = startValue;
    int endColor = endValue;
    int alpha = (int) (Color.alpha(startColor) + f * (Color.alpha(endColor) - Color.alpha(startColor)));
    int red = (int) (Color.red(startColor) + f * (Color.red(endColor) - Color.red(startColor)));
    int green = (int) (Color.green(startColor) + f * (Color.green(endColor) - Color.green(startColor)));
    int blue = (int) (Color.blue(startColor) + f * (Color.blue(endColor) - Color.blue(startColor)));
    return Color.argb(alpha, red, green, blue);
  }
};
origin: stackoverflow.com

 public class CustomBounceInterpolator implements Interpolator {

private float timeDivider;
private AccelerateInterpolator a;
private BounceInterpolator b;

public CustomBounceInterpolator(float timeDivider) {
  a = new AccelerateInterpolator();
  b = new BounceInterpolator();
  this.timeDivider = timeDivider;
}

public float getInterpolation(float t) {
  if (t < timeDivider)
    return a.getInterpolation(t);
  else
    return b.getInterpolation(t);
}

}
origin: stackoverflow.com

 public class AccelerateOvershootInterpolator implements Interpolator
{
 private AccelerateInterpolator accelerate;
 private OvershootInterpolator overshoot;

 public AccelerateOvershootInterpolator(float factor, float tension)
 {
  accelerate = new AccelerateInterpolator(factor);
  overshoot = new OvershootInterpolator(tension);
 }

 @Override
 public float getInterpolation(float input)
 {
  return overshoot.getInterpolation(accelerate.getInterpolation(input));
 }

}
origin: 7heaven/CurtainSlidingMenu

float longRatio = Math.abs(fy - touchY) / longDisSide;
longRatio = interpolator.getInterpolation(longRatio);
origin: stackoverflow.com

float alpha = accelartor.getInterpolation(diff / duration);
if (alpha < 1) {
  handler.postDelayed(this, 10);
origin: gotev/android-speech

private void animateUp(long delta) {
  boolean finished = false;
  int minHeight = (int) (fromHeightPart * bar.getMaxHeight());
  int toHeight = (int) (bar.getMaxHeight() * toHeightPart);
  float timePart = (float) delta / BAR_ANIMATION_UP_DURATION;
  AccelerateInterpolator interpolator = new AccelerateInterpolator();
  int height = minHeight + (int) (interpolator.getInterpolation(timePart) * (toHeight - minHeight));
  if (height < bar.getHeight()) {
    return;
  }
  if (height >= toHeight) {
    height = toHeight;
    finished = true;
  }
  bar.setHeight(height);
  bar.update();
  if (finished) {
    isUpAnimation = false;
    startTimestamp = System.currentTimeMillis();
  }
}
origin: zagum/SpeechRecognitionView

private void animateUp(long delta) {
  boolean finished = false;
  int minHeight = (int) (fromHeightPart * bar.getMaxHeight());
  int toHeight = (int) (bar.getMaxHeight() * toHeightPart);
  float timePart = (float) delta / BAR_ANIMATION_UP_DURATION;
  AccelerateInterpolator interpolator = new AccelerateInterpolator();
  int height = minHeight + (int) (interpolator.getInterpolation(timePart) * (toHeight - minHeight));
  if (height < bar.getHeight()) {
    return;
  }
  if (height >= toHeight) {
    height = toHeight;
    finished = true;
  }
  bar.setHeight(height);
  bar.update();
  if (finished) {
    isUpAnimation = false;
    startTimestamp = System.currentTimeMillis();
  }
}
origin: vikramezhil/DroidSpeech

private void animateUp(long delta)
{
  boolean finished = false;
  int minHeight = (int) (fromHeightPart * bar.getMaxHeight());
  int toHeight = (int) (bar.getMaxHeight() * toHeightPart);
  float timePart = (float) delta / BAR_ANIMATION_UP_DURATION;
  AccelerateInterpolator interpolator = new AccelerateInterpolator();
  int height = minHeight + (int) (interpolator.getInterpolation(timePart) * (toHeight - minHeight));
  if (height < bar.getHeight()) {
    return;
  }
  if (height >= toHeight) {
    height = toHeight;
    finished = true;
  }
  bar.setHeight(height);
  bar.update();
  if (finished) {
    isUpAnimation = false;
    startTimestamp = System.currentTimeMillis();
  }
}
origin: VREMSoftwareDevelopment/WiFiAnalyzer

  float factor = mAnimationInterpolator.getInterpolation(timeFactor);
  if (timeFactor <= 1.0) {
    startXAnimated = (startX - lastAnimationReferenceX) * factor + lastAnimationReferenceX;
float factor = mAnimationInterpolator.getInterpolation(timeFactor);
if (timeFactor <= 1.0) {
  first_X = (first_X - lastAnimationReferenceX) * factor + lastAnimationReferenceX;
origin: prolificinteractive/Chandelier

final float it = getInRange(ACCELERATE_INTERPOLATOR.getInterpolation(t), 0f, 1f);
final float it = getInRange(ACCELERATE_INTERPOLATOR.getInterpolation(t), 0f, 1f);
origin: stackoverflow.com

    mAccelerateInterpolator.getInterpolation(
        yDiff / mDistanceToTriggerSync));
float offsetTop = yDiff;
origin: Coinomi/coinomi-android

    mAccelerateInterpolator.getInterpolation(
        yDiff / mDistanceToTriggerSync));
updateContentOffsetTop((int) (yDiff));
origin: openwalletGH/openwallet-android

    mAccelerateInterpolator.getInterpolation(
        yDiff / mDistanceToTriggerSync));
updateContentOffsetTop((int) (yDiff));
android.view.animationAccelerateInterpolatorgetInterpolation

Popular methods of AccelerateInterpolator

  • <init>

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • getContentResolver (Context)
  • getResourceAsStream (ClassLoader)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Reference (javax.naming)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top Vim plugins
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