Reputation: 11
I have 3 EditText
named editTextA , editTextB and editTextC
. What I want to do is when text changes on either one of the EditTexts, the other two to update.
It is working correctly with single addTextChangedListener for editTextA and updating editTextB. But when I add another addTextChangedListener to editTextB, it is not working. My app crashed. I used hasfocus()
method to find that which EditText
is currently focused but same result.
Upvotes: 1
Views: 79
Reputation: 1043
While I'm agree with Mahdi-bagvand, I had same problem and you need to put an ending condition. For example for me it was the length
of one EditText
. Without putting an ending condition this will be an infinite loop and your app will crash.
Upvotes: 0
Reputation: 1407
you problem is infinite loop.
Upvotes: 1