LineMoveIndicator.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:Dachshund-Tab-Layout 作者:
public LineMoveIndicator(DachshundTabLayout dachshundTabLayout){
    this.dachshundTabLayout = dachshundTabLayout;

    linearInterpolator = new LinearInterpolator();

    valueAnimatorLeft = new ValueAnimator();
    valueAnimatorLeft.setDuration(DEFAULT_DURATION);
    valueAnimatorLeft.addUpdateListener(this);
    valueAnimatorLeft.setInterpolator(linearInterpolator);

    valueAnimatorRight = new ValueAnimator();
    valueAnimatorRight.setDuration(DEFAULT_DURATION);
    valueAnimatorRight.addUpdateListener(this);
    valueAnimatorRight.setInterpolator(linearInterpolator);

    rectF = new RectF();
    rect = new Rect();

    paint = new Paint();
    paint.setAntiAlias(true);
    paint.setStyle(Paint.Style.FILL);

    leftX = (int) dachshundTabLayout.getChildXLeft(dachshundTabLayout.getCurrentPosition());
    rightX = (int) dachshundTabLayout.getChildXRight(dachshundTabLayout.getCurrentPosition());

    edgeRadius = -1;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号