any_names_left
Lurker
I'm a noob with Java but have a question that I cant seem to find the answer too.
How do I have multiple buttons, each with different numerical values that when clicked add to each other and results shown in the TextView without requiring the click of an equals button. I was going to try to copy the theory of the onclick from this calculator code but it didn't work because I either did it wrong or I am just too stupid! http://mrbool.com/how-to-create-a-calculator-app-for-android/28100
For example:
Button 1 (2.40) + Button 2 (1.00) + Button 3 (3.20) = TextView (6.60)
or
Button 1 (2.40) + Button 2 (1.00) + Button 2 (1.00) + Button 3 (3.20) = TextView (7.60)
Etc, etc.
If anyone could help I would really appreciate it.
How do I have multiple buttons, each with different numerical values that when clicked add to each other and results shown in the TextView without requiring the click of an equals button. I was going to try to copy the theory of the onclick from this calculator code but it didn't work because I either did it wrong or I am just too stupid! http://mrbool.com/how-to-create-a-calculator-app-for-android/28100
For example:
Button 1 (2.40) + Button 2 (1.00) + Button 3 (3.20) = TextView (6.60)
or
Button 1 (2.40) + Button 2 (1.00) + Button 2 (1.00) + Button 3 (3.20) = TextView (7.60)
Etc, etc.
If anyone could help I would really appreciate it.