LevelView.java 文件源码

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

项目:science-journal 作者:
private void init(AttributeSet attrs, int defStyle) {
    // Load attributes
    final TypedArray a = getContext().obtainStyledAttributes(
            attrs, R.styleable.LevelView, defStyle, 0);

    mBackground = new ShapeDrawable(new OvalShape());
    mBackground.getPaint().setColor(getResources().getColor(R.color.level_background_color));
    mBubble = new ShapeDrawable(new OvalShape());
    mBubble.getPaint().setColor(getResources().getColor(R.color.level_bubble_color));

    mMarkPaint = new Paint();
    mMarkPaint.setColor(getResources().getColor(R.color.level_mark_color));

    mEdgePaint = new Paint();
    mEdgePaint.setColor(getResources().getColor((R.color.level_edge_color)));
    mEdgePaint.setStyle(Paint.Style.STROKE);
    mEdgePaint.setStrokeWidth(a.getDimension(R.styleable.LevelView_edgeWidth, 10));

    a.recycle();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号