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. OutOfMemoryError: how best to transfer large video files into a byte array?

Not directly - the videoByteArray is used for the FilePart once I have
the whole thing, like this:

    videoByteArray = getBytesFromFile(cR, fileUriString);
    FilePart videoFile = new FilePart("fileupload", new
                                        "fileupload", videoByteArray));
    Part[] parts = {
            new StringPart("name", name),
            videoFile };

But I get the error on the first line of that code, in the readBytes
that's called from getBytesFromFile.

I guess this is all academic if I need to rewrite it to use HttpPut,


To ask a dumb question, as someone who hasn't used chunked uploading
before: how can I indicate to the server the order in which to glue
the chunks back together? (Tell me to go away and ask a Java forum if
you want.)


2. advice + onclick help

Hello there,

I'm new to android development and have a question or two to ask:

1,  In my app I have a list view and have about 60 items in my list.
Im making a timetable app. I wanted to keep everything offline. So
that all the timetables could be stored in the app. But now I'm
thinking i'll just give a link to the relevant webpage. Does anyone
have any suggestions on this ?
2.  I was looking in the dev guide, for the on click item can anyone
give me an example. I have this:

private OnClickListener mCorkyListener = new OnClickListener() {
            public void onClick(View v) {
              Intent i = new Intent(this, info.class);

but it ain't working.

Hope I'm not asking too much.

Thanks in advance


3. OutOfMemoryError: how best to transfer large video files into a byte array?

4. How to position an overlaying activity at the bottom?

5. How to position an overlaying activity at the bottom?

6. Terminal Colors while Compiling

7. How do know when user launches application