[android-developers] Re: How to capture Soft keyboard key events.
There are no events for those things. They are just internal state changes in the IME. Some IMEs may not even have such changes -- for example a handwriting one may allow you to write letters and numbers in the same area. On Fri, Oct 30, 2009 at 3:56 AM, Nandy wrote: > > Hi Banny, Hassan, > > Even i faced the same problem and added on text change listener > through text watcher. But in this case I am not able to catch the > events of keys like caps, shift, changing from abc to 123. > Any idea on this how to solve? > > Thanks and Regards, > Nandy > > On Oct 30, 12:17 pm, Gulfam wrote: > > Hi Banny, > > > > Thanks alot. I have implemented the code same as you its working very > > well for me. It was very big issue for my app but now resolved :) > > Thanks again. > > > > Regads, > > Gulfam Hassan > > > > On Oct 30, 7:53 am, Banny wrote: > > > > > I find the same problem of it. > > > Finally, I found EditText.addTextChangedListener(new TextWatcher(){}) > > > will let get the event. > > > Good luck. > > > > > On Oct 29, 11:09 pm, Gulfam wrote: > > > > > > Is there any solution I am still waiting for your Response > > > > > > Gulfam Hassa > > > > > > On Oct 28, 9:41 pm, Gulfam wrote: > > > > > > > Hi all group members, > > > > > > > I am facing a problem any one can help me regarding this. > > > > > > > I have an EditTextand a list of contacts. I want to search a > > > > > contacts on maching with characters entered inEditTextfield. In my > > > > > activity I have implemented "OnKeyListener" . > > > > > > > and in onCreat (){ > > > > > searchField = (EditText)findViewById(R.id.search_field); > > > > > searchField.setOnKeyListener(this);} > > > > > > > and i have also implemented the method like this > > > > > > > public boolean onKey(View v, int keyCode, KeyEvent event) { > > > > > > > //Here i am getting text from my search field and comparing with > > > > > contacts and updating contacts list > > > > > > > } > > > > > > > When i pressed keys like (abc ---> xyz or 0 -->9 or any key) from > my > > > > > computer key board or > > > > > keyboard which is displaying on right side of the emulator my code > is > > > > > working fine. Currently I am using HTC Magic Emulator and Device > also. > > > > > > > ***Its workin fine for me** > > > > > But now move to issue-->>> > > > > > > > when i touchEditTextfield a software keyboard launched and when i > > > > > pressed any key from my screen keyboard > > > > > its not giving me the events in onKey() method in other words its > not > > > > > calling onKey(){} method. but this method is called on specific > keys > > > > > like (0 to 9 and Delete key). > > > > > > > I have also implement "keyListener" interface and its 4 to 5 > methods > > > > > like keyUp(), keyDown(),etc but when i implement "keyListener" > > > > > softkeyboard is not launching on touching myEditTextfield. > > > > > > > Any useful solution would be highly appriciated. > > > > > Thanks in advance. > > > > > Gulfam Hassan > > > > > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: How to capture Soft keyboard key events.
Hi Banny, Hassan, Even i faced the same problem and added on text change listener through text watcher. But in this case I am not able to catch the events of keys like caps, shift, changing from abc to 123. Any idea on this how to solve? Thanks and Regards, Nandy On Oct 30, 12:17 pm, Gulfam wrote: > Hi Banny, > > Thanks alot. I have implemented the code same as you its working very > well for me. It was very big issue for my app but now resolved :) > Thanks again. > > Regads, > Gulfam Hassan > > On Oct 30, 7:53 am, Banny wrote: > > > I find the same problem of it. > > Finally, I found EditText.addTextChangedListener(new TextWatcher(){}) > > will let get the event. > > Good luck. > > > On Oct 29, 11:09 pm, Gulfam wrote: > > > > Is there any solution I am still waiting for your Response > > > > Gulfam Hassa > > > > On Oct 28, 9:41 pm, Gulfam wrote: > > > > > Hi all group members, > > > > > I am facing a problem any one can help me regarding this. > > > > > I have an EditTextand a list of contacts. I want to search a > > > > contacts on maching with characters entered inEditTextfield. In my > > > > activity I have implemented "OnKeyListener" . > > > > > and in onCreat (){ > > > > searchField = (EditText)findViewById(R.id.search_field); > > > > searchField.setOnKeyListener(this);} > > > > > and i have also implemented the method like this > > > > > public boolean onKey(View v, int keyCode, KeyEvent event) { > > > > > //Here i am getting text from my search field and comparing with > > > > contacts and updating contacts list > > > > > } > > > > > When i pressed keys like (abc ---> xyz or 0 -->9 or any key) from my > > > > computer key board or > > > > keyboard which is displaying on right side of the emulator my code is > > > > working fine. Currently I am using HTC Magic Emulator and Device also. > > > > > ***Its workin fine for me** > > > > But now move to issue-->>> > > > > > when i touchEditTextfield a software keyboard launched and when i > > > > pressed any key from my screen keyboard > > > > its not giving me the events in onKey() method in other words its not > > > > calling onKey(){} method. but this method is called on specific keys > > > > like (0 to 9 and Delete key). > > > > > I have also implement "keyListener" interface and its 4 to 5 methods > > > > like keyUp(), keyDown(),etc but when i implement "keyListener" > > > > softkeyboard is not launching on touching myEditTextfield. > > > > > Any useful solution would be highly appriciated. > > > > Thanks in advance. > > > > Gulfam Hassan > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: How to capture Soft keyboard key events.
Hi Banny, Thanks alot. I have implemented the code same as you its working very well for me. It was very big issue for my app but now resolved :) Thanks again. Regads, Gulfam Hassan On Oct 30, 7:53 am, Banny wrote: > I find the same problem of it. > Finally, I found EditText.addTextChangedListener(new TextWatcher(){}) > will let get the event. > Good luck. > > On Oct 29, 11:09 pm, Gulfam wrote: > > > Is there any solution I am still waiting for your Response > > > Gulfam Hassa > > > On Oct 28, 9:41 pm, Gulfam wrote: > > > > Hi all group members, > > > > I am facing a problem any one can help me regarding this. > > > > I have an EditTextand a list of contacts. I want to search a > > > contacts on maching with characters entered inEditTextfield. In my > > > activity I have implemented "OnKeyListener" . > > > > and in onCreat (){ > > > searchField = (EditText)findViewById(R.id.search_field); > > > searchField.setOnKeyListener(this);} > > > > and i have also implemented the method like this > > > > public boolean onKey(View v, int keyCode, KeyEvent event) { > > > > //Here i am getting text from my search field and comparing with > > > contacts and updating contacts list > > > > } > > > > When i pressed keys like (abc ---> xyz or 0 -->9 or any key) from my > > > computer key board or > > > keyboard which is displaying on right side of the emulator my code is > > > working fine. Currently I am using HTC Magic Emulator and Device also. > > > > ***Its workin fine for me** > > > But now move to issue-->>> > > > > when i touchEditTextfield a software keyboard launched and when i > > > pressed any key from my screen keyboard > > > its not giving me the events in onKey() method in other words its not > > > calling onKey(){} method. but this method is called on specific keys > > > like (0 to 9 and Delete key). > > > > I have also implement "keyListener" interface and its 4 to 5 methods > > > like keyUp(), keyDown(),etc but when i implement "keyListener" > > > softkeyboard is not launching on touching myEditTextfield. > > > > Any useful solution would be highly appriciated. > > > Thanks in advance. > > > Gulfam Hassan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: How to capture Soft keyboard key events.
I find the same problem of it. Finally, I found EditText.addTextChangedListener(new TextWatcher(){}) will let get the event. Good luck. On Oct 29, 11:09 pm, Gulfam wrote: > Is there any solution I am still waiting for your Response > > Gulfam Hassa > > On Oct 28, 9:41 pm, Gulfam wrote: > > > Hi all group members, > > > I am facing a problem any one can help me regarding this. > > > I have an EditTextand a list of contacts. I want to search a > > contacts on maching with characters entered inEditTextfield. In my > > activity I have implemented "OnKeyListener" . > > > and in onCreat (){ > > searchField = (EditText)findViewById(R.id.search_field); > > searchField.setOnKeyListener(this);} > > > and i have also implemented the method like this > > > public boolean onKey(View v, int keyCode, KeyEvent event) { > > > //Here i am getting text from my search field and comparing with > > contacts and updating contacts list > > > } > > > When i pressed keys like (abc ---> xyz or 0 -->9 or any key) from my > > computer key board or > > keyboard which is displaying on right side of the emulator my code is > > working fine. Currently I am using HTC Magic Emulator and Device also. > > > ***Its workin fine for me** > > But now move to issue-->>> > > > when i touchEditTextfield a software keyboard launched and when i > > pressed any key from my screen keyboard > > its not giving me the events in onKey() method in other words its not > > calling onKey(){} method. but this method is called on specific keys > > like (0 to 9 and Delete key). > > > I have also implement "keyListener" interface and its 4 to 5 methods > > like keyUp(), keyDown(),etc but when i implement "keyListener" > > softkeyboard is not launching on touching myEditTextfield. > > > Any useful solution would be highly appriciated. > > Thanks in advance. > > Gulfam Hassan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: How to capture Soft keyboard key events.
Is there any solution I am still waiting for your Response Gulfam Hassa On Oct 28, 9:41 pm, Gulfam wrote: > Hi all group members, > > I am facing a problem any one can help me regarding this. > > I have an EditText and a list of contacts. I want to search a > contacts on maching with characters entered in EditText field. In my > activity I have implemented "OnKeyListener" . > > and in onCreat (){ > searchField = (EditText)findViewById(R.id.search_field); > searchField.setOnKeyListener(this);} > > and i have also implemented the method like this > > public boolean onKey(View v, int keyCode, KeyEvent event) { > > //Here i am getting text from my search field and comparing with > contacts and updating contacts list > > } > > When i pressed keys like (abc ---> xyz or 0 -->9 or any key) from my > computer key board or > keyboard which is displaying on right side of the emulator my code is > working fine. Currently I am using HTC Magic Emulator and Device also. > > ***Its workin fine for me** > But now move to issue-->>> > > when i touch EditText field a software keyboard launched and when i > pressed any key from my screen keyboard > its not giving me the events in onKey() method in other words its not > calling onKey(){} method. but this method is called on specific keys > like (0 to 9 and Delete key). > > I have also implement "keyListener" interface and its 4 to 5 methods > like keyUp(), keyDown(),etc but when i implement "keyListener" > softkeyboard is not launching on touching my EditText field. > > Any useful solution would be highly appriciated. > Thanks in advance. > Gulfam Hassan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---