Timed Input on EditText

pcbtmr

Member
Licensed User
Longtime User
Wondering how this might be done. A user enters number in an edit text box and after say .5 sec of non-entry, the data is extracted rather than waiting for focus change or enter.
Many Thanks for any help.
 
Last edited:

margret

Well-Known Member
Licensed User
Longtime User
You need to set a timer that ticks every 1/4 second or so and in the timer tick event check and compare the text. If it has not changed in the selected amount of time, save that data to where you need it and move the focus to another view or button. You can also disable the EditText if you need to.

Turn the timer on when the EditText gets focus and turn the timer off when the EditText loses focus or your condition of time passed has been reached.
 
Last edited:
Upvote 0
Top