Hi I have the same problem with my app. Only the back key and the OK key trigger the onKey method. I can't understand what's wrong since this app has not been modified for months and used to work onto Android 1.5
To bypath this issue I used a TextWatcher, but I am very interested in what's wrong with the onKey method. Guillaume Imbert 2011/2/28 Mohammad Haque <shumi...@gmail.com> > Hi > > I have came across a problem with android 2.1 EditText. It does not > fire onKey event listener. > > EditText edit = (EditText) findViewById(R.id.edit); > edit.setOnKeyListener(new OnKeyListener() { > > @Override > public boolean onKey(View v, int keyCode, KeyEvent > event) { > Log.d("TAG","onKey() - " + keyCode); > return false; > } > }); > > > I dont see any log's print when I type any key. It works on other > platform but not in 2.1. Anyone has any idea how I can get rid of this > problem or any way around (if any). Or this is not a problem at all > and I'm being stupid using it wrong way :-) > > Regards > Mohammad > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en