how can I clear a transparent or translucent canvas

by Romain Guy » Fri, 13 Mar 2009 01:47:45 GMT

Sponsored Links
 Just call Canvas.drawColor(0).

Romain Guy
Android framework engineer

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them


Other Threads

1. What is the best way to handle Images?

Hi All,

I wrote a application that load images from facebook and i show in
lmageview, using this below code.

                                InputStream object = myDataFromServer;

it works fine for me. But the trouble is when i run my application for
a longer time, it gives me error,
OutofMemoryError, and becuse of this error my application crash.

      so want to know is there any better way to handling
images.please help me.

Sohan Badaya


2. ActivtyGroup - problem returning to the root activity.

Hi All,

Probably not known to me but i do not find this happening with

I have a service-bind() in the root activity of a activitygroup and in the
same frame two redirector buttons for two activities.

*public class RemoteServiceBinding extends ActivityGroup {*
             localActMngr = getLocalActivityManager();

             Button activity1 = (Button)findViewById(;
             Button activity2 = (Button)findViewById(;


on click of each i pass the current service-passed data and the same gets
updated there.

My problem starts with the back-key pressed on each of the invoked
Whenever i press the back button i do not come to the root activity which
started the activity.To top it the service also shuts down.

*public boolean onKeyDown(int keyCode, KeyEvent event) {

                                Activity current =
                                     if (current != null) {

                                        Intent i = new

localActMngr.startActivity("", i);
                                        return current.onKeyDown(keyCode,
*return false;

If somebody has an idea,please help.



     `6_ 6  )   `-.  (     ).`-.__.`)
     (_Y_.)'  ._   )  `._ `. ``-..-'
   _..`--'_..-_/  /--'_.' ,'
  (il),-''  (li),'  ((!.-'



3. KoinKuLator v0.

4. people.NUMBER is deprecated....what else i can use in place of it

5. Tanya desire user

6. add <uses-permission> to application via Java code

7. Tolong tes Alkitab 1.0-dev7