• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.
I am a very beginner in android development. So as a beginning project i was trying to make an coffee order layout with some buttons. After writing the logic when i am trying to run the app, it is crashing.
I have shared the screenshot of my java file and design below

upload_2021-5-21_0-29-4.png


upload_2021-5-21_0-27-54.png


increaseQuantity() is an onclick operation set on the button to increase the amount by one.
decreaseQuantity() is set to decrease the quantity by one.
submitOrder() is set on Order Now button that just shows a toast about final order summary.

Please help me to fix this issue.
 

Attachments

  • upload_2021-5-21_0-19-31.png
    upload_2021-5-21_0-19-31.png
    64.4 KB · Views: 123
  • upload_2021-5-21_0-23-7.png
    upload_2021-5-21_0-23-7.png
    14.4 KB · Views: 112

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones