Giter VIP home page Giter VIP logo

android_studio_calculatorapplication_2017_forbeginners's Introduction

Developing Calucator Application using Android Studio

This tutorial is all about creating a calucator application using android studio for beginners.

Getting Started

These instructions will get you clear understanding of how to create an calcuator application using android studio. Little glance of java programming is necessary if you dont have any idea about OOP programming languages.

Prerequisites

What things you need to install

Android Studio

activity_main.xml

It is an user interface. It acts as a front end in android developement.

Things to do:

  • First of all we need to 2 textfield to hold input value that is the number.
  • Then we should have one textview to display the result.
  • We need 4 operators to perform addition,subtraction,multiplication,division.

Changes to be done in activity_main.xml

  • Change the RelativeLayout to LinearLayout.
  • Add android:orientation="vertical" for vertical alignment of the widgets.
  • Have two textfield having the dataformat as numbers.
  • Have one textview to display results.
  • Buttons for sub,add,mul,div.
  • Set id for each of the above fields.

MainActivity.java

It is the backend of android development. Here we will perform all the computation here.

Things to be remembered

  • First initialize set of TextView,EditText,Button,int,float.,etc. that you are going to be using in program.
  • After intilization you need to perform code inside onCreate() function.
  • findViewById -> denotes the set of id that you have given before in the xml widgets.
  • getText() ->used to get the value from the inputTextField.
  • setText() ->Used to display outcome of the result in the TextView.
  • setOnClickListener -> These are the even listeners that is to perform events i.e, list of operations to performed if an event is triggered.

Built With

Authors

Screenshots

Alt text Alt text Alt text

android_studio_calculatorapplication_2017_forbeginners's People

Contributors

dineshsonachalam avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.