get "black screen" when call unlockCanvasAndPost

by 鐒?鍒 » Thu, 02 Sep 2010 01:58:51 GMT

Sponsored Links
The source code as an example :

        Canvas c=mHolder.lockCanvas(null);
        Paint paint=new Paint();
        c.drawRect(new RectF(40,60,80,80), paint);

My aim is to draw several graphics using lockCanvas and
unlockCanvasAndPost at different places controled by keydown event,but
each time when I press the key,the screen becomes black and only
drawing current graphics,when pressing the key again,the background
So how to overcome this problem?


Other Threads

1. Please suggest me possible ways to get Image data from camera

That's how it is.

RAW data callback is not supported.
The JPEG image data is the full-size image as it has been taken by the
camera. Per default, it should be 2048*1536 px.
And taking a picture takes this long, about a second. You can mitigate
this by pre-focusing


2. Do devs write Android software for love or for money?

I imagine myself living my life on a warm island doing nothing but
having fun with my wife and kid(s) ;)
I did start writing for Android for fun though, and like almost
everybody else hope I'll make some bucks.



3. permissions related to /dev/alarm and setting the system

4. can replace default dialer?

5. Dispatch event from children to parent

6. Exception locking surface - lockCanvas() returns a null?

7. require eclipse 3.1 , 3.2