ForegroundLinearLayout.java 文件源码

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

项目:Android-DFU-App 作者:
public ForegroundLinearLayout(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);

    TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ForegroundRelativeLayout,
            defStyle, 0);

    final Drawable d = a.getDrawable(R.styleable.ForegroundRelativeLayout_foreground);
    if (d != null) {
        setForeground(d);
    }

    a.recycle();

    if (this.getBackground() instanceof NinePatchDrawable) {
        final NinePatchDrawable npd = (NinePatchDrawable) this.getBackground();
        mRectPadding = new Rect();
        if (npd.getPadding(mRectPadding)) {
         mUseBackgroundPadding = true;
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号