(Context context, AttributeSet attrs)
| 78 | } |
| 79 | |
| 80 | private void init(Context context, AttributeSet attrs) { |
| 81 | TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.DPImageView); |
| 82 | mBorderWidth = a.getDimensionPixelSize(R.styleable.DPImageView_biv_border_width, mBorderWidth); |
| 83 | mBorderColor = a.getColor(R.styleable.DPImageView_biv_border_color, mBorderColor); |
| 84 | isOverLay = a.getBoolean(R.styleable.DPImageView_biv_border_overlay, isOverLay); |
| 85 | mBorderIgnorePadding = a.getBoolean(R.styleable.DPImageView_biv_border_ignore_padding, mBorderIgnorePadding); |
| 86 | |
| 87 | shape = a.getInt(R.styleable.DPImageView_biv_shape, shape); |
| 88 | |
| 89 | radius = a.getDimensionPixelOffset(R.styleable.DPImageView_biv_corner_radius, radius); |
| 90 | topLeftRadius = a.getDimensionPixelOffset(R.styleable.DPImageView_biv_corner_topLeftRadius, topLeftRadius); |
| 91 | topRightRadius = a.getDimensionPixelOffset(R.styleable.DPImageView_biv_corner_topRightRadius, topRightRadius); |
| 92 | bottomLeftRadius = a.getDimensionPixelOffset(R.styleable.DPImageView_biv_corner_bottomLeftRadius, bottomLeftRadius); |
| 93 | bottomRightRadius = a.getDimensionPixelOffset(R.styleable.DPImageView_biv_corner_bottomRightRadius, bottomRightRadius); |
| 94 | |
| 95 | a.recycle(); |
| 96 | |
| 97 | mBorderPaint.setStyle(Paint.Style.STROKE); |
| 98 | mBorderPaint.setAntiAlias(true); |
| 99 | mBorderPaint.setColor(mBorderColor); |
| 100 | mBorderPaint.setStrokeWidth(mBorderWidth); |
| 101 | } |
| 102 | |
| 103 | @Override |
| 104 | public void setPressed(boolean pressed) { |
no test coverage detected