Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,344 members, 7,811,993 topics. Date: Monday, 29 April 2024 at 05:27 AM

Building A Simple Calculator With Android Studio - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Building A Simple Calculator With Android Studio (1444 Views)

Creating A Simple Calculator Using HTML,CSS And Javascript / My Semester GPA Calculator With Javascript / How To Create A Simple Calculator (using Javascript ) (2) (3) (4)

(1) (Reply)

Building A Simple Calculator With Android Studio by Falz2017: 10:34am On May 26, 2017

This tutorial is base on creating a very simple calculator for Android using Android Studio and it also assumes that you have Android Studio (2.3.2 was used) installed, know a little bit about java and ability to read and understand texts.

The application is really going to be simple and lazy in terms of programming, but it is enough to get you started.

The Application Rules
It can only use one operator
You must click on the equals (=) to get your result
Steps
The first thing you will need to do is to create an android project with Activity “MainActivity” and Layout “activity_main.xml.”

After this, you will need to design your layout with Buttons and a textview for displaying the results. Make sure it looks like the XML below with the appropriate onClick functions for easy communication with the MainActivity.

The source code doesn't display well here embarassed. Check here http://thetechlicense.com/2017/05/25/building-simple-calculator-android-studio/.


Now it is time to code our MainActivity as follow:

Create the onClick funtions
Seven variables
And create a view for the TextView
The code below will explain itself
MainActivity.java
The source code doesn't display well here embarassed. Check here http://thetechlicense.com/2017/05/25/building-simple-calculator-android-studio/.

Results after a successfully compilation
A very effective android application for calculating only integer values as shown below



Assignment

If you have compiled yours, you would notice the absence of the multiplication. You job is to fit that into the project. Very simple.

A complete Calculator is coming soon. Download apk here https://drive.google.com/open?id=0B0CkX8jlUfu2TWQ2QkRWLXJWdms.

(1) (Reply)

I Need An MQL4 Programmer For A Quick Job / I Finally Built A Todo App. / ### HOT ### Get Free Software To Increase You Feedburner Subscribers

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 7
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.