Code Monkey home page Code Monkey logo

tip_calculator's Introduction

Tip Calculator App for Android

This is a user-friendly Tip Calculator app built with Jetpack Compose for Android. It allows you to easily calculate the tip amount for your restaurant bill, taking into account the bill amount, tip percentage, and optional round-up preference.

Features:

  • Clear and concise interface: The app features a clean and modern design with an intuitive layout for easy navigation.
  • Effortless calculation: Enter the bill amount and tip percentage, and the app instantly displays the calculated tip amount.
  • Round-up option: Choose to round the tip up to the nearest whole number for convenience.
  • Multilingual support (potential): The app can potentially be adapted to display tip amounts in different currencies based on user locale (not currently implemented in this code example).

Getting Started

  1. Clone the repository or download the source code.
  2. Open the project in Android Studio. Ensure you have the latest Android SDK and tools installed.
  3. Run the app on an Android device or emulator.

Code Structure

The code is organized into well-defined composable functions:

  • MainActivity: The entry point of the app, setting up the content using Jetpack Compose.
  • TipCalculatorApp: The main composable function that displays the entire tip calculator UI.
  • EditNumberField: A custom composable for text fields with labels and leading icons, specifically designed for entering numerical data.
  • RoundTheTipRow: A composable function for the row displaying the round-up tip toggle.
  • calculateTip: A function that calculates the tip amount based on bill amount, tip percentage, and round-up option.

Dependencies

The app relies on the following libraries:

  • Jetpack Compose
  • AndroidX libraries (Activity, Material3)

License

This project is available under the Apache License 2.0. See the LICENSE file for more details.

Contributing

We welcome your contributions! Feel free to fork the repository, make changes, and submit pull requests.

Here's what the Tip Calculator app might look like:

te

Note: This is just a visual representation based on the code. The actual appearance might differ based on your theme or device.

tip_calculator's People

Contributors

shreyaskbkukke avatar

Watchers

 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.