Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android : Make image opaque / transparent

Tags:

android

Greetings,

I would like to place an image over a surfaceview. However I would like the image to be transparent so you can see the image and also the undlying surfaceview. Can anyone suggest how I could do this?

like image 392
Steve Avatar asked Jan 30 '26 03:01

Steve


1 Answers

This is how I do it before drawing my shapes.

Bitmap buffer = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_4444);
buffer.eraseColor(Color.TRANSPARENT);
like image 163
Tughi Avatar answered Jan 31 '26 19:01

Tughi