elye
11/18/2021, 4:06 AMoverride fun onDraw(canvas: Canvas) {
super.onDraw(canvas)
CoroutineScope(Dispatchers.Default).launch { // <-- add coroutine
canvas.drawLine(
0f, 0f,
width.toFloat(), height.toFloat(),
strokePaint
)
}
}
More detail (with image) hereNick Allen
11/18/2021, 5:02 AMdrawLine
while the "CUSTOM" text view is drawing. Every view draws to the same canvas. Translation and scale can be changed for every view that is drawn. See Canvas
methods with descriptions that reference "matrix".elye
11/18/2021, 5:24 AM