Sunday 15 June 2014

android input fields affect each other -



android input fields affect each other -

in android have multiple form widgets in same view , i'd have them impact each other. right have edittext field can type integer , i'd have value show in series of togglebuttons (i.e. binary value of edittext field shows selected buttons). i'd both fields impact each other, clicking button changes text , changing text changes button.

right i'm using aftertextchanged() method grab updated text , alter buttons. i'm using oncheckedchanged() method grab updated button clicks , alter text.

it works going in either direction, when they're both in there, phone call each other, can lead undesirable behavior. there way alter state of field without calling 'change handler' or there handler work improve avoid recursive calls?

use settext() method of edittext set value of when changed user changing toggle button values.

android android-edittext oncheckedchanged

No comments:

Post a Comment