want to draw over a changing solid-color background

by Rob Y. » Fri, 23 Apr 2010 10:56:32 GMT


Sponsored Links
 I'm trying to draw an animated picture over a background that I want
to shift gradually in color.

The picture is kept in a bitmap, and on each frame, I erase the
background to the new background color and then draw the bitmap on top
of it.  The bitmap was originally cleared to Color.TRANSPARENT, and
that works.  I can see the background color.  But as I animate my
image, each pixel in the bitmap that I 'erase' to Color.TRANSPARENT
seems to remain whatever color it originally was.  Eventually I just
end up with a big blob of color where the moving image should be.

Am I doing something wrong?  How come Color.TRANSPARENT results in
transparency when I use it to drawColor to my bitmap canvas, but not
when I draw with a Color.TRANSPARENT paint to the same canvas?

--



Other Threads

1. Suppressing touch events with ACTION_CANCEL

Hi,

I am suppressing the touch events depending upon the size in the
dispatchTouchEvent of View.java. If the event size is greater than the
threshhold i m sending the event as ACTION_CANCEL to onTouchEvent. I
wanted to know how ACTION_CANCEL works. In the android document it
says it cancel the current gesture. What is the meaning of gesture (is
it  ACTION_DOWN plus something which can happen between ACTION_UP) or
is it individual event like ACTION_DOWN, ACTION_UP or ACTION_MOVE ?

Thanks in advance.

Rahul

-- 

2. Better Keyboard 4.1

Nemu Better keyboard 4.1, belum coba.

http://depositfiles.com/en/files/8r8lgo9jb

salam,
Hermanto

-- 
=========================
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group:

Click  

3. Questions about data persistence

4. How to draw lines through onTouchEvent

5. On distribution of APP

6. Sony Ericsson Developer World on Android Developers

7. How to retrieve sms number