How to handle canvas..?

Put your problem here if it does not fit any of the other categories.

How to handle canvas..?

Postby saif_pucit » Tue Jun 22, 2010 6:49 am

im new to andorid i want to put the button on canvas which i have displayed...?
I also want to manage the D-pad button for my canvas.
i have implement the keyListner interface and its onKey method but when the canvas is displayed the it does not work.However it works in the activity class but not in the view class having the onDraw() method..
Can any body help me...?
i would be very thankful for him/her...
Posts: 2
Joined: Tue May 18, 2010 8:40 am


Re: How to handle canvas..?

Postby nicholas.hauschild » Wed Jun 23, 2010 1:58 am

It sounds like you are trying to use a KeyPressListener, and it is working in the activity, but not in the view, correct?

Well, this is expected behavior, you will have KeyPresses register to your Activity, and you can then act on your View from there (because it should be a member of your Activity).

Good Luck!
Master Developer
Master Developer
Posts: 310
Joined: Fri Dec 04, 2009 4:50 am


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 5 guests