Git Product home page Git Product logo

tipcalc's Introduction

Week 1 Project: Tip Calculator

This is a basic tip calculator.

Time spent: 12 hours total.

Completed user stories:

  • Required: User is displayed the tip of specified percentage for specified entered amount
  • Required: User enters the total amount of the transaction
  • Required: User can select between tip amounts (i.e 10%, 15%, 20%)
  • Required: Upon selecting tip amount, formatted tip value is displayed
  • Optional: User changes the total amount and updated tip is reflected automatically
  • Optional: User can select custom tip percentage if desired
  • Optional: User can select how many ways to split the tip
  • Optional: User can edit preset tip percentages and have them persist across launches
  • Optional: Experiment with trying input widgets to replace the buttons and/or textviews
  • Optional: Improve the user interface and experience by using images and/or colors

Release Notes:

TipCalc generates a table of tip percentages. I found this a better user experience than entering an exact percentage. I rarely tip EXACTLY 15%. Instead, I round the total amount based on the cash in my pocket (i.e. $20 bills) or to the nearest dollar amount. Being able to quickly guesstimate the tip in the right ballpark is valuable to me.

Implementation Notes:

Decided to change the dollar sign icon after initial project creation. Wasn't as bad as I thought it would be.

Added gesture detection to allow user to increment / decrement number of people to split the bill by swiping left/right.

Spent time trying the number picker widget, but couldn't get it to work properly. Arrows never showed up in the emulator nor on a real device. Decided to punt this and use gesture + EditText for number of people.

Tried changing the layout to add some margins to the border of the screen, but that totally messed things up. Decided to revert and live with a crappy UI.

Wrestled a lot with graphical layout. Decided to edit XML directly to get the layout elements that I wanted.

Todo:

  • Add margin to the outline of parent. Text is bumping against borders
  • Center the "Per Person" and "Total Bill" text views
  • Right justify columns with dollar amounts
  • Highlight rows for 15% and 20% to show standard tips - requires multiple textviews to highlight different rows, or perhaps a table layout
  • Add images and UI "magic" to make the app look better.
  • Allow user to input location name. Save location + bill amount in a persistent database so user can download to Google sheet
  • Deal with corner cases involving large bills amounts (greater than $800k), or large numbers of people (i.e. 1000 people splitting a small bill might show 0 tip)

Walkthrough of all user stories:

Video Walkthrough

tipcalc's People

Watchers

SPaikmos avatar

tipcalc's Issues

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.