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
romain...@android.com

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;
                                Bitmap 
bmpImage=BitmapFactory.decodeStream(object);
                                imageView.setImageBitmap(bmpImage);

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.

Thanks,
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
Android-ActivityGroup

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();

 setContentView(R.layout.remote_service_binding);
             Button activity1 = (Button)findViewById(R.id.activity1);
             Button activity2 = (Button)findViewById(R.id.activity2);
                           activity1.setOnClickListener(activity1Listener);
                           activity2.setOnClickListener(activity2Listener);

                           initService();
*
*}*

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
activities.
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 =
localActMngr
().getCurrentActivity();
                                     if (current != null) {

                                        Intent i = new
Intent(getApplicationContext(),RemoteServiceBinding.class);

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


If somebody has an idea,please help.






-- 

Regards,

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

KKK
9241482044

-- 

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