I am creating a custom view by extending android.view.View
.
Now, I need to draw a rounded rectangle on API level below 21. Android has a built in method name,drawRoundRect(float left, float top, float right, float bottom, float rx, float ry, Paint paint)
in android.graphics.Canvas
, but It doesn't support API below 21, but I need to draw this on API 16. How can I achieve that?
Thanks in advance