Good morning everyone. I know from the title it's everything confused, so I will try to explain it better. I need to create an app for a medical project to calc HbA1c. I have 3 editText in which I type values of medical test. Each of three changes because of other one. For example: if I have 42 in one, the other one is 5.99%. And so on. I'm trying to make them change dynamically: change still during I'm writing. I tried using an OnCliclListener but I have to write the entire value.
I don't know if I explain myself as good to make you understand.
Thank you very much
Instead of using
onClickListener
, try usingaddTextChangedListener()
and change your TextViews wheneveronTextChanged()
is called. By using this you can even change them while typing.It looks something like this:
Though answer by @Anjani is correct and you could use it but I would recommend using Butterknife. Here is the code: