@Override
public void draw(Canvas canvas) {
int height = getBounds().height();
int width = getBounds().width();
// allow drawing out of bounds vertically
Rect clipBounds = canvas.getClipBounds();
clipBounds.inset(-12, -12);
canvas.clipRect(clipBounds, Region.Op.REPLACE);
RectF rect = new RectF(0.0f, 0.0f, width, height);
// background
canvas.drawRoundRect(rect, mRadius, mRadius, mPaintBg);
// border
canvas.drawRoundRect(rect, mRadius, mRadius, mPaintBorder);
}
MyRoundCornerDrawable.java 文件源码
java
阅读 44
收藏 0
点赞 0
评论 0
项目:phonk
作者:
评论列表
文章目录