PhoenixHeader.java 文件源码

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

项目:GitHub 作者:
private void initView(Context context, AttributeSet attrs) {
    mMatrix = new Matrix();
    DensityUtil density = new DensityUtil();
    mSunSize = density.dip2px(40);
    setupAnimation();
    setupPathsDrawable();
    setMinimumHeight(density.dip2px(100));

    TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.PhoenixHeader);

    int primaryColor = ta.getColor(R.styleable.PhoenixHeader_phPrimaryColor, 0);
    int accentColor = ta.getColor(R.styleable.PhoenixHeader_phAccentColor, 0);
    if (primaryColor != 0) {
        setBackgroundColor(primaryColor);
        if (accentColor != 0) {
            mDrawableSky.parserColors(primaryColor, accentColor);
        } else {
            mDrawableSky.parserColors(primaryColor);
        }
    }

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


问题


面经


文章

微信
公众号

扫码关注公众号