[android-developers] Re: How to capture soft keyboard's key events.

2009-07-02 Thread Saurav Mukherjee
well i have not tried capturing the keys from the soft keyboard, but u cud try out a round abt method for checking the number of chars exceeded. u cud run a thread tht keeps track of the text entered in the edit text box. wen it exceeds, delete from the edit text box. if u have a better sol

[android-developers] Re: How to capture soft keyboard's key events.

2009-07-02 Thread Chris
Let me tell you what i really want, actually i have to show an alert box saying max. limit reached when the characters limit reaches 100, so for that i need to sense the key events occured and show the alert box. As of now i am able to detect computer's keys, emulator's

[android-developers] Re: How to capture soft keyboard's key events.

2009-07-02 Thread Saurav Mukherjee
thats pretty simple. run a thread with a while(no of chars max){} . wen it exceeds, the while stops and then send a Message to a message handler to display the dialog box. u can get the number of chars in the thread by running a handler.post(Runnable) method. hope this help. cheers! On Thu,

[android-developers] Re: How to capture soft keyboard's key events.

2009-07-02 Thread Sujay Krishna Suresh
A simpler solution would be to implement a textwatcher. On Thu, Jul 2, 2009 at 4:12 PM, Saurav Mukherjee to.saurav.mukher...@gmail.com wrote: thats pretty simple. run a thread with a while(no of chars max){} . wen it exceeds, the while stops and then send a Message to a message handler to

[android-developers] Re: How to capture soft keyboard's key events.

2009-07-02 Thread Chris
Dude, i want to show the alert dialog box ONLY when user press any key on the keyboard(softkeypad), if user dont press any key no alert box will pop-up. Is your sol. provides this functionality?? On Jul 2, 3:42 pm, Saurav Mukherjee to.saurav.mukher...@gmail.com wrote: thats pretty simple. run a

[android-developers] Re: How to capture soft keyboard's key events.

2009-07-02 Thread Chris
Whats is this stuff(textwatcher) man?? On Jul 2, 3:48 pm, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: A simpler solution would be to implement a textwatcher. On Thu, Jul 2, 2009 at 4:12 PM, Saurav Mukherjee to.saurav.mukher...@gmail.com wrote: thats pretty simple. run a

[android-developers] Re: How to capture soft keyboard's key events.

2009-07-02 Thread Saurav Mukherjee
yes. wen the user presses the key, the text len increases. wen the text len increases, the thread checks for the length. if the length exceeds, message is sent. at the message handler, message is received. wen the message is received, dialog box is displayed. this must be self explanatory. On

[android-developers] Re: How to capture soft keyboard's key events.

2009-07-02 Thread Sujay Krishna Suresh
plz visit http://developer.android.com/reference/android/text/TextWatcher.html to no more... It can be associated with an edittext as follows. yourEditText.addTextChangedListener(yourTextWatcher); then in either the aftertextchanged or ontextchanged you could show the alert. On Thu,

[android-developers] Re: How to capture soft keyboard's key events.

2009-07-02 Thread Chris
Thanks man , i will try this solution , looks like it will solve my problem. On Jul 2, 4:12 pm, Saurav Mukherjee to.saurav.mukher...@gmail.com wrote: yes. wen the user presses the key, the text len increases. wen the text len increases, the thread checks for the length. if the length exceeds,

[android-developers] Re: How to capture soft keyboard's key events.

2009-07-02 Thread Chris
Thank you dude, it looks like helpful, thank you very much On Jul 2, 4:15 pm, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: plz visithttp://developer.android.com/reference/android/text/TextWatcher.html to no more... It can be associated with an edittext as follows.            

[android-developers] Re: How to capture soft keyboard's key events.

2009-07-02 Thread Chris
Thank you very much. It solved my problem. On Jul 2, 4:15 pm, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: plz visithttp://developer.android.com/reference/android/text/TextWatcher.html to no more... It can be associated with an edittext as follows.