Tuesday, 13 June 2017

Simple Calculator app in Android

Simple Calculator app in Android

Download Source Code


This post is similar to that of 

Adding two numbers in Android

 We are using different operations like subtraction, multiplication,division and also addition.

Read Working with Multiple Buttons


This example is the combination of the last two post

Adding two numbers in Android and Working with Multiple buttons,so if you have practiced that well this program is easy for you or else practice that both examples and continue this example.


We need to make the design plan.

Simple-Calculator-app-in-Android
Create a new project and Just drag and drop and edit as per in the design.

Simple-Calculator-app-in-Android

The number 1 and Number 2 can be typed using the help of hint property.

To use the hint right click on the Plain Text  and EditHint

add-hint

Then register the buttons,edittext's, textview's in MainActivity.java

onclick-method


After that add switch case statement  as in the last post and include the addition of two numbers example code and also include code for other operations also as in the image.

Simple-Calculator-app-in-Android-source-code

I think it is very easy to understand right! yeah it's so simple to develop android apps than you think if you have basic programming concepts and interest to learn!!!

Let we see the Output

Simple-Calculator-app-in-Android-output

Simple-Calculator-app-in-Android-output


When clicked ADD Button

Simple-Calculator-app-in-Android-output
When Clicked SUB Button

Simple-Calculator-app-in-Android-output
When clicked MUL button

Simple-Calculator-app-in-Android-output
When clicked DIV Button

Simple-Calculator-app-in-Android-output

How to use Android Phone as an Emulator



Practice this example more times and do it without referring any example codes.

It will make you to have strong knowledge in working with buttons.


18 comments :

  1. I like to recommend exclusively fine plus efficient information and facts, hence notice it: 172 cm in feet

    ReplyDelete
  2. It is perfect time to make some plans for the future and it is time to be happy. I've read this post and if I could I desire to suggest you some interesting things or suggestions. Perhaps you could write next articles referring to this article. I want to read more things about it! Iphone Download Latest version

    ReplyDelete
  3. Google has not discharged any normal (UI) planning procedure or rules for the portable application designers. Subsequently, most engineers assemble Android apps without adhering to any standard UI advancement procedure or rules. Bulk SMS Service Provider in Sharjah UAE

    ReplyDelete
  4. Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more. online antiderivative calculator

    ReplyDelete
  5. Today, mobile app market has grown rapidly as one of the greatest business promotion platforms with a large universal audience that is rapidly increasing each year. As the stats reveal, the Android and iPhone market together dominate 98 percent of the smartphone market, with Android on the upper hand sharing 84 percent of the market share.Smart AudioBook Player

    ReplyDelete
  6. well is say just Whenever you arrived at our site, the first you should know is you can buy the highest quality and most expensive ipad case, additionally your favorite apple ipad cases as well as ipad add-ons. You will find hundreds types of ipad situation this website

    ReplyDelete
  7. Very informative post! There is a lot of information here that can help any business get started with a successful social networking campaign. Download ppsspp iso game

    ReplyDelete
  8. I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people. lulubox

    ReplyDelete
  9. To make video that makes a brand for you, the videos must have the option to be transferred to the Web. To do this you will require an amplifier and camcorder that is perfect with your PC like this Twitter Video Download

    ReplyDelete
  10. At the point when one downloads and afterward introduces an application on Android from legitimate destinations or other informal locales, they are really introducing APK particle the gadget. itools crack

    ReplyDelete
  11. Appreciate it for this post, I am a big fan of this internet site would like to keep updated. ui design agency san francisco

    ReplyDelete
  12. Thumbs up guys your doing a really good job. 亚博

    ReplyDelete
  13. Its such as you read my mind! You appear to understand a lot about this, like you wrote the e-book in it or something. I believe that you simply could do with a few % to force the message house a bit, however other than that, this is wonderful blog. A great read. I'll certainly be back. device mockups

    ReplyDelete
  14. it is always easy to find good ski resorts online, but most of them are expensive but they are great anyway` ipad device template

    ReplyDelete
  15. Extremely customizable and loaded with power Android is the most versatile system on the market. Currently no other smartphone operating system offers as many hardware and performance options as the Android system. Free Apk Download

    ReplyDelete
  16. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. blackmart alpha 2015

    ReplyDelete
  17. When you use a genuine service, you will be able to provide instructions, share materials and choose the formatting style. hookup scout

    ReplyDelete