HorizontalProgressView.java 文件源码

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

项目:boohee_v5.6 作者:
private void init(AttributeSet attrs) {
    if (attrs != null) {
        TypedArray array = getContext().obtainStyledAttributes(attrs, R.styleable
                .HorizontalProgressView);
        this.totalNumber = array.getInt(0, 4);
        this.currentNumber = array.getInt(1, 0);
        this.completedColor = array.getColor(2, this.completedColor);
        this.uncompletedColor = array.getColor(3, this.uncompletedColor);
        this.gapWidth = (int) array.getDimension(4, (float) dip(this.gapWidth));
        this.itemWidth = (int) array.getDimension(5, 0.0f);
        array.recycle();
    } else {
        this.gapWidth = dip(this.gapWidth);
    }
    this.paint.setAntiAlias(true);
    this.paint.setStyle(Style.FILL);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号