java - How to fix Operator button bugs of my calculator app in android studio? -


when click operator buttons( +, -, *, / ) in calculator app made android studio, before putting number buttons, calculator closed, means putting number , putting operator okay. want nothing happens when click operator, before number clicked.

  • case 1 : number buttons click -> operator button click working.
  • case 2 : operator button click or equals button click closed.

i've created calculator app in android studio in there 4 buttons:

  1. add
  2. subtract
  3. multiply
  4. divide

i used decimal number representation , suppose if enter first no. 6.0 , second 5.0 , when click add gives 30.0 buttons not working.

please answer me fix this.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -