开发者

Real-time calc of editText?

I have an editText that开发者_如何学JAVA brings up the number keyboard. When you enter a number in, I want it to perform a calculation before it shows up in the box.

So the box initially reads $0.00, you click on it, hit 5, it does a calculation and shows up in the box as $0.05, if you then hit 4 it shows up as $0.54, hit 3 and it's $5.43, etc.

From what I understand, an addTextChangeListener TextWatcher is needed. I have one... but I don't understand how to manipulate the data before it appears in the box. I'm also having troubles with math calculations on what the TextWatcher provides. Can somebody please point me in the right direction?


This one's got some options: Android Money Input with fixed decimal

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜