+91-9893712371

Home » Android Studio Programs » Android Button » Android Studio: Sum two numbers

Android Studio: Sum two numbers

If you want to make a program for the sum two numbers in android. The code will be following.

In this app we need

  • 2 EditText controls to take input of 2 numbers from the user,
  • 1 Button for getting result after putting the numbers in the EditText controls,
  • 2 TextView, 1 for setup the heading of the program and 2nd for showing the result.

we will also use of Tost for showing the result.

This android app will cover working of,

EditText

TextView

Button

Toast

  1. activity_main.xml

2. MainActivity.java

Our App will look like this.

Leave a Reply

Your email address will not be published. Required fields are marked *