get "black screen" when call unlockCanvasAndPost

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


Sponsored Links
 Hi!
The source code as an example :

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

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
recoveryed.
So how to overcome this problem?

--



Other Threads

1. Linux commands not found in init.rc scripts

Hi All,

I am trying to create some soft links by init.rc script, but the "ln"
command is not recognized by the init.rc script. But same command, i
am able to run from the adb shell. Can someone let me know why it's
not happening.

Thanks,
Vishu

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: 

2. Matching TextView heights

I have two vertical TableLayouts containing rows of TextViews
separated by some graphics. Something like this:

R-L     Graphics    R-R
R-L                      R-R
R-L                      R-R
R-L                      R-R
R-L                      R-R

The R-R TextViews have a fixed width, which means they grow vertically
when the text is longer than will fit in the width. The text is set at
runtime so this height is not known in advance. I want the height of
the R-L rows to exactly match the height of the R-R rows with the R-R
rows being the reference source for the height.

Once I do a TextView.setText and a TextView.setWidth on the R-R
TextViews, the height of those TextViews should be determined. Then I
can do a TextView.setMinHeight on the R-L TextViews. But I'm having
trouble getting the height value from the R-R TextViews. The
TextView.getHeight method returns zero.

Any ideas?

-- 

3. How wrong is this?

4. Application checksum at runtime

5. Possibility of a curved Gallery

6. Keyboard layout different languages. Android Tablets Keyboard Layout.

7. tiling nine patch (instead of stretching)