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
To unsubscribe, reply using "remove me" as the subject.