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?
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?
The section "Manipulating Image Pixels" in the post Working with images in Android shows how to manipulate pixels. If you were to set the alpha channel of each pixel to 128, the image would be 50% transparent or opaque depending if you are a glass half empty or half full type of person.
This is how I do it before drawing my shapes.
Bitmap buffer = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_4444);
buffer.eraseColor(Color.TRANSPARENT);
Another good source for image manipulation is: http://www.javalobby.org/articles/ultimate-image/