Hello
I search to to listen a some key by the followin code :
tv.setOnKeyListener(new OnKeyListener() {
@Override public boolean onKey(View v, int keyCode,
KeyEvent event) {
if (KeyEvent.ACTION_UP != event.getAction()) {
// int color = Color.BLUE;
tv.setText("Ohlalal");
switch (keyCode) {
case KeyEvent.KEYCODE_CALL:
// color = Color.MAGENTA;
tv.setText("kfkkfklffklfglk");
setContentView(tv);
break;
case KeyEvent.KEYCODE_ENTER:
// color = Color.YELLOW;
tv.setText("jgfjgjgjg");
break;
default:tv.setText("poonpoonon"); ;
}
// makeDot(dots, dotView, color);
setContentView(tv);
// tv.invalidate();
// tv.refreshDrawableState();
}
return true;
}
});
But when I press some key ( eg: Enter of the board near the emulato) I
find nothing
Who can say me where is the problem
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---