Here is my code for dot button. But i need to avoid multiple dot input.
Asked
Active
Viewed 562 times
1 Answers
0
You can use a boolean variable to control the number of dots you need. enabling or disabling that boolean variable will allow or disallow to enter dot.
e.g.
_allowDots = true;
if(_allowDots)
{
tvInput.setText(process + ".");
_allowDots = false
}
next time when it will run. it will not go inside of the statement.

Rusty Pythonic Script
- 127
- 5
-
Haider bro...it working only for one dot for one time...if i click dot for the first time i can't click it second timr...like i want that 1.2+1.3...but it just working for 1.2 either if i clear it totally dot Isn't working... – Ahammad Al Maruf Nov 04 '20 at 07:40
-
yes you have to assign true to _allowDots variable to get . next time in your example its a good idea to assign true to _allowDots in your process "+" code then after + you can get another dot for one time. – Rusty Pythonic Script Nov 04 '20 at 09:15