1

How to tie a numeric editText field with a variable so that they can be automatically updated both ways?

view story
linux-howto

http://stackoverflow.com – In the code, I have an integer variable. In the GUI, I have a numeric editText field and two buttons which increase/decrease the value of the variable by one. I need to link the field to the variable so that the field shows the current value of the variable every time it's changed (ie. the buttons are pressed), and set the variable value automatically when the user edits the field using the Android keyboard. Preferably, I'd like it to update the variable automatically without the need to press "Done" (if possible), however I also need to set a limit for the number. Additionally, a method need (HowTos)