java类android.graphics.Interpolator的实例源码

View.java 文件源码 项目:droidel 阅读 35 收藏 0 点赞 0 评论 0
public void run() {
    long now = AnimationUtils.currentAnimationTimeMillis();
    if (now >= fadeStartTime) {

        // the animation fades the scrollbars out by changing
        // the opacity (alpha) from fully opaque to fully
        // transparent
        int nextFrame = (int) now;
        int framesCount = 0;

        Interpolator interpolator = scrollBarInterpolator;

        // Start opaque
        interpolator.setKeyFrame(framesCount++, nextFrame, OPAQUE);

        // End transparent
        nextFrame += scrollBarFadeDuration;
        interpolator.setKeyFrame(framesCount, nextFrame, TRANSPARENT);

        state = FADING;

        // Kick off the fade animation
        host.invalidate(true);
    }
}
InterpolatorSubject.java 文件源码 项目:truth-android 阅读 24 收藏 0 点赞 0 评论 0
public static SubjectFactory<InterpolatorSubject, Interpolator> type() {
  return new SubjectFactory<InterpolatorSubject, Interpolator>() {
    @Override
    public InterpolatorSubject getSubject(FailureStrategy fs, Interpolator that) {
      return new InterpolatorSubject(fs, that);
    }
  };
}
InterpolatorSubject.java 文件源码 项目:truth-android 阅读 25 收藏 0 点赞 0 评论 0
protected InterpolatorSubject(FailureStrategy failureStrategy, Interpolator subject) {
  super(failureStrategy, subject);
}
InterpolatorAssert.java 文件源码 项目:assertj-android 阅读 23 收藏 0 点赞 0 评论 0
public InterpolatorAssert(Interpolator actual) {
  super(actual, InterpolatorAssert.class);
}


问题


面经


文章

微信
公众号

扫码关注公众号