Hello,
       Can I know how to draw multiple canvases on one canvas ?

somthing like this :
 Canvas c1 = new Canvas(bmp1);
 Canvas c2 = new Canvas(bmp2);
 Canvas c3 = new Canvas(bmp3);

canvasX. draw ( .... c1 ... ) ;
canvasX. draw ( .... c2 ... ) ;
canvasX. draw ( .... c3 ... ) ;

How to draw multiple canvases on another canvas ?

On Apr 7, 2:11 pm, sblantipodi <[email protected]> wrote:
> Hi,
> I have a views on the main class and many other class with an onDraw()
> method to
> draw a canvas.
>
> Java:
>
> public boolean onKeyDown(int kc, KeyEvent event) {
>
>         if (kc == KeyEvent.KEYCODE_BACK) {
>           // Do something
>         }
>         // Ripitto
>         invalidate();
>         return false;
>
> }
>
> I have the same code also for menu button and DPAD button.
> The strange thing is that canvas doesn't listen any keyboard command
> before I tap the screen
> and move a dpad button.
>
> I'll try to explain me better, suppose that I'm on the main View, I
> display the canvas on class X,
> once displayed before keyboard start working I need to:
> 1) Tap the screen
> 2) Move a dpad button
> 3) Than I can use back button and menu button
>
> If I don't execute the three steps as I described I can't use back and
> menu button.
> On the class used to display canvas I also put this in the constructor
> but it doesn't help:
>
> Java:
>
> setFocusable(true);
> setFocusableInTouchMode(true);
>
> Have you got some idea?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to