0

I'm a new Android developper and I want to do a steamWindow like, but i have some difficulties to do.

First, i created 2 bitmap : _ my bitmap1 is the bitmap to clean, _ and the other is the bitmap to show. When i clean the bitmap1, i have several little black square (pixel) that appear.

I have tested different ways, but none really functioned. Can you help me to implement this system?

thanks __

I tried to use Lumis' code but it doesnt work. So I have the same code as Lumis.

I think that my background and my overlay are made transparent when I clean the overlay.

Any Idea?

Community
  • 1
  • 1
Ivory
  • 77
  • 1
  • 10

1 Answers1

0

In order to get transparency in a bitmap, you must manipulate the alpha-channel.

Typical bitmaps are RGBA 24-bit color (8 bits for each channel, R, G, B, and A respectively). This means that you should be able to manipulate each channel individually.

I do not know if Android includes a way to process bitmaps like this. What you can do is use View alpha to manipulate the transparency of your views.

This alpha channel can be set in XML or in code. You should set an initial value in your XML form, then manipulate it in code if you need it to change when certain things happen.

Hope this helps!

Codeman
  • 12,157
  • 10
  • 53
  • 91
  • I tried to take the Lumis' code but, it doesn't work ... http://stackoverflow.com/questions/5368774/make-certain-area-of-bitmap-transparent-on-touch – Ivory Nov 09 '11 at 08:42