/TipCalculator-Android

CS 194A Assignment 1

Primary LanguageKotlin

Tip Calculator

Andrew Benson

Tippy computes the tip and total amount for a bill. The app uses the base amount and tip percentage to calculate the amount owed, and it also describes the quality of service based on the tip.

Time spent: 3 hours spent in total

Functionality

The following required functionality is completed:

  • User can enter in a bill amount (total amount to tip on)
  • User can enter a tip percentage (what % the user wants to tip).
  • The tip and total amount are updated immediately when any of the inputs changes.
  • The user sees a label or color update based on the tip amount.

The following extensions are implemented:

  • Custom colors palette selected
  • Emoji appears underneath tip description
  • For consistency, tip and total initially show 0.0
  • Minor code refactoring not worth mentioning in further detail

Video Walkthrough

Here's a walkthrough of implemented user stories:

Video Walkthrough

GIF created with adb shell screenrecord and ffmpeg apparently using some low quality settings.

Notes

Android Studio + YouTube together crashed my computer - that was rough.

The suggested way of making a GIF doesn't support Linux, so I had to do some adb shell screenrecord and ffmpeg magic.

License

(Under the terms of my employment with Google, I only claim authorship, not copyright, of this code.)

Copyright 2020 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.