Reputation: 28555
I am trying to figure out how I can force an EditText to remove its focus after a number has been inputted so that its OnFocusChangedListener will fire. Basically I want the user to be able to input a number and then have a calculation adjust as soon as they are done. They only way it works right now is when the user clicks on something else to take focus away from the EditText then it works, but i'd like it to be more automatic.
Is there some listener I can use so that it gets fired as soon as the text inside changes?
Upvotes: 4
Views: 7402
Reputation: 1559
The TextChangedListener does exactly that. Attach one to your edit text and it will be called whenever the text changes.
Upvotes: 3