android.view.animation.Animation.getInterpolator()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(104)

本文整理了Java中android.view.animation.Animation.getInterpolator()方法的一些代码示例,展示了Animation.getInterpolator()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Animation.getInterpolator()方法的具体详情如下:
包路径:android.view.animation.Animation
类名称:Animation
方法名:getInterpolator

Animation.getInterpolator介绍

暂无

代码示例

代码示例来源:origin: square/assertj-android

public S hasInterpolator(Interpolator interpolator) {
 isNotNull();
 Interpolator actualInterpolator = actual.getInterpolator();
 assertThat(actualInterpolator) //
   .overridingErrorMessage("Expected interpolator <%s> but was <%s>.", interpolator,
     actualInterpolator) //
   .isSameAs(interpolator);
 return myself;
}

代码示例来源:origin: davideas/FlipView

/**
 * Custom initial layout animation.<br>
 * <p><b>Note:</b> Duration and startOffset will be overridden by the following settings:</p>
 * {@code duration = initialLayoutAnimationDuration;}<br>
 * {@code startOffset = initialDelay += SCALE_STEP_DELAY}.
 *
 * @param initialLayoutAnimation the new initial animation
 */
public final void setInitialLayoutAnimation(Animation initialLayoutAnimation) {
  this.initialLayoutAnimation = initialLayoutAnimation;
  initialLayoutAnimation.setDuration(initialLayoutAnimationDuration);
  initialLayoutAnimation.setStartOffset(initialDelay += SCALE_STEP_DELAY);
  if (initialLayoutAnimation.getInterpolator() == null)
    initialLayoutAnimation.setInterpolator(new DecelerateInterpolator());
}

代码示例来源:origin: stackoverflow.com

@Override
public void onAnimationEnd(Animation animation) {
      Transformation t = new Transformation();
      final float interpolatedTime = animation.getInterpolator().getInterpolation(animation.getDuration());
      Class params[] = {Float.TYPE, Transformation.class};
      try {

        Method m = mAnimationYouWantToGetFinalTransformationFrom.getClass().getDeclaredMethod("applyTransformation", params);
        m.setAccessible(true);
        m.invoke(mAnimationYouWantToGetFinalTransformationFrom, interpolatedTime, t);

        // update object to this final transformation matrix
        // For Example: mObjectMatrix = t.getMatrix();

        // run your next animation
      }  // Necessary Catch blocks

代码示例来源:origin: com.squareup.assertj/assertj-android

public S hasInterpolator(Interpolator interpolator) {
 isNotNull();
 Interpolator actualInterpolator = actual.getInterpolator();
 assertThat(actualInterpolator) //
   .overridingErrorMessage("Expected interpolator <%s> but was <%s>.", interpolator,
     actualInterpolator) //
   .isSameAs(interpolator);
 return myself;
}

相关文章

微信公众号

最新文章

更多