1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| package com.mylhyl.circledialog.res.drawable;
|
| import android.graphics.drawable.ShapeDrawable;
|
| /**
| * 圆角
| * Created by hupei on 2017/3/29.
| */
| public class CircleDrawable extends ShapeDrawable {
|
| public CircleDrawable(int backgroundColor, int radius) {
| this(backgroundColor, radius, radius, radius, radius);
| }
|
| public CircleDrawable(int backgroundColor, int leftTopRadius, int rightTopRadius, int rightBottomRadius,
| int leftBottomRadius) {
| getPaint().setColor(backgroundColor);//内部填充颜色
| //圆角半径
| setShape(DrawableHelper.getRoundRectShape(leftTopRadius, rightTopRadius, rightBottomRadius, leftBottomRadius));
| }
|
| }
|
|