I am trying to create bitmap with semi-transparent background (not black). I use the next code:
val result = drawable.bitmap.copy(Bitmap.Config.ARGB_8888, true)
for (y in 0 until result.height) for (x in 0 until result.width) {
val dstColor = Color.argb(100, 255, 255, 255)
result.setPixel(x, y, dstColor)
}
But all I see is white opaque white color. I've tried to set alpha param to 0, use different colors (read, green), but it doesn't work. What the possible reasons?