Help us measure site usage?

With your permission, we use self-hosted analytics to understand page usage. It is optional and does not affect the Service. Learn more.

KotlinbeginnermobileAI generated

Android Tip & Bill Splitter App

Build a simple Android app with Jetpack Compose that calculates the tip on a restaurant bill and splits the total between friends. Type the bill amount, choose the tip percentage with a slider or quick buttons (10%, 15% and 20%), set the number of people, and the app instantly shows the tip, the total, and how much each person pays, with an option to round up. It's a perfect first Android app: you'll learn building screens with Compose, text fields and sliders, state with remember and mutableStateOf, state hoisting, formatting money for the user's country, Material 3 theming, and testing.

Estimate
~6h
Steps
6
Completed by
0
Proposed by
codeseed.app

Jetpack Compose · Android Studio

Project roadmap

  1. 01

    Create the project

    ~0.5h

    Install Android Studio and create a project with the Empty Activity (Compose) template. Replace the greeting with a column containing a title, and run it on an emulator. Done when: the app runs on the emulator and shows your title.

  2. 02

    Build the inputs

    ~1.5h

    Add an OutlinedTextField for the bill amount with a number keyboard, a Slider for the tip percentage (0 to 30%) plus buttons for 10, 15 and 20%, and a counter with - and + buttons for the number of people (1 to 20). Keep each value in state with remember and mutableStateOf, and move the state up to the screen (state hoisting) so the input components only receive values and callbacks. Done when: all inputs respond and show their current values.

  3. 03

    Calculate the results

    ~1h

    Write the calculation as a separate Kotlin function (bill, tip percent, people and round up to tip, total and per person), using BigDecimal for exact money. Show the results on screen, updating as the user types. Treat an empty or invalid amount as nothing to calculate yet, and show an error for negative amounts. Done when: results update instantly and are correct for examples calculated by hand.

  4. 04

    Style the results

    ~1h

    Format money with NumberFormat.getCurrencyInstance for the user's country, show the results in a Material 3 card with the per-person amount largest, add a Round up switch that rounds each person's share up to a whole unit, and apply a theme with your own colors in light and dark mode. Done when: the app looks tidy, and currency formatting follows the phone's settings.

  5. 05

    Test on devices

    ~1h

    Run the app on a small and a large emulator and in landscape, fixing layout problems (make the screen scroll when needed). Check edge cases: no amount, very large amounts, 0% tip and one person. Make sure values survive rotation with rememberSaveable. Done when: the app works on different screen sizes and keeps values when rotated.

  6. 06

    Write tests

    ~1h

    Write unit tests for the calculation function (normal cases, rounding up, 0% tip and one person) and a Compose UI test that types an amount, changes the people count and checks the per-person text. Done when: all tests pass.

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~6h · 6 steps

Tech stack

Jetpack ComposeAndroid Studio