Edittext - more than one Listener?

Asked

Viewed 65 times

0

I am continuing a project that makes orders on Android, and I came across the monetary format on EditText

Researching I managed to find a class that is working smoothly, more because I’m talking about mask?

So mine layout has Unit Value, Quantity, Discount and Total Value Quantity and discount are fields that when modifying them need to update the Total Value.

My doubt must be one of those very basic but I’m not able to pass on, surely I must be missing the fundamental of java.

I can’t calculate because I applied the Quantity and Event discount component addTextChangedListener(new TextWatcher()) applying the mask how can I have another Listener for the purpose of calculating the Total value ?

It would not be correct to put a button just for the purpose of showing the total value, the correct one would be when the user interacts with the field this happens

  • Read this question that will help you!

  • Hello Thiago good afternoon. Not much to do with what I asked, Mascara was commented on both? Yes it was more the question is to be able to put another Reader because there is already one for the mask, but I need another for when the value is typed call a method to calculate the total value.

  • Hello! Not in relation to the mask, but in using another Listener. You cannot use the same Listener (unless q adapts to perform both functions). Note that the question has another one marked as duplicate. It also addresses the same theme!

  • Hello, good afternoon, sir. well my dear do not understand, I went on the link and read the other question more it has to do with mask, my question has not to do with mask but if there is how to put another Istener

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.