This occur when try to draw canvas from imageView which using Coil to load image.
Could you help me solve problem? Thank you all
fun loadImageFromUrl() {
bodyImageView?.load(imagePathServer)
}
This is code for draw bitmap from imageview
fun getBitmapFromView(view: View?): Bitmap? {
var bitmap =
Bitmap.createBitmap(view!!.width, view.height, Bitmap.Config.ARGB_8888)
var canvas = Canvas(bitmap)
view.draw(canvas)
return bitmap
}
Problem is shown