效果图

代码
class CustView(context: Context, attributeSet: AttributeSet? = null) :
View(context, attributeSet) {
private var mPaint: Paint = Paint()
init {
mPaint.color = Color.RED
}
override fun onDraw(canvas: Canvas) {
//mPaint.style = Paint.Style.STROKE//空心圆
canvas.drawCircle(300f, 300f, 200f, mPaint);
}
}
安卓开发入门教程系列汇总
安卓发展历程及前景
初探安卓
开发语言学习
UI控件学习系列
UI控件_TextView
UI控件_EditText
UI控件_Button
UI控件_ImageView
UI控件_RadioButton
UI控件_CheckBox
UI控件_ProgressBar
关注头条号,第一时间获取最新文章:

网友评论