diff --git a/README.md b/README.md index 9260380..74afa9d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,14 @@ # calculator-app -simple calculator to perform basic mathematical operations. + +# Calculator App + +[![Build Status](https://semaphoreapp.com/api/v1/projects/d4cca506-99be-44d2-b19e-176f36ec8cf1/128505/badge.svg)](https://nachiketavadera.github.io/Flashlight) +[![Open Source Love](https://badges.frapsoft.com/os/v2/open-source.svg?v=102)](https://github.com/NachiketaVadera/Flashlight) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) + +## Summary + +This is a simple calculator application that performs basic operations.
  1. Performs simple arithmetic calculation
  2. @@ -8,26 +17,49 @@ simple calculator to perform basic mathematical operations.
  3. Good userinterface
-HOW TO CONTRIBUTE +## Downloads + +## Code + +The majority of the code is written in Java and is simple. For detecting shake motion: +Declare global variables: + +```java + switch(v.getId()) + { + + case R.id.add : + b = Integer.valueOf(etn1.getText().toString()); + etn1.setText(""); + c = a + b; + break; + + case R.id.sub : + etn1.setText(null); + + b = Integer.valueOf(etn1.getText().toString()); + c = a - b; break; + + case R.id.mul : etn1.setText(null); + + b = Integer.valueOf(etn1.getText().toString()); + c = a * b; break; -Getting started + case R.id.div : etn1.setText(null); -1. Fork this repository (Click the Fork button in the top right of this page, click your Profile Image) -2. Clone your fork down to your local machine + b = Integer.valueOf(etn1.getText().toString()); + c = a / b; break; - git clone https://github.com/your-username/calculator-app.git - -3. Create a branch + case R.id.result : etn1.setText(String.valueOf(c)); + } +``` - git checkout -b branch-name - -4. Make your changes (choose from any task) +## Contributing :wink: -5. Commit and push +Any help, including feedback, is highly appriciated. I have just started out with Android and I’m relatively new to app development. - git add . - git commit -m 'Commit message' - git push origin branch-name - -6. Create a new pull request from your forked repository (Click the New Pull Request button located at the top of your repo) -Wait for your PR review and merge approval! \ No newline at end of file +1. Fork it! +2. Create your feature branch: `git checkout -b new-branch` +3. Commit your changes: `git commit -am 'Make a valuable addition'` +4. Push to the branch: `git push origin new-feature` +5. Submit a pull request :D