我正在通过扩展创建自定义视图android.view.View
。
现在,我需要在 21 以下的 API 级别上绘制一个圆角矩形。Android 有一个内置的方法名称drawRoundRect(float left, float top, float right, float bottom, float rx, float ry, Paint paint)
in android.graphics.Canvas
,但它不支持 21 以下的 API,但我需要在 API 16 上绘制这个。我怎样才能做到这一点?
提前致谢