CalculatorX is a modern Android calculator app written in Kotlin, supporting all basic arithmetic operations plus two unique operators that set it apart from traditional calculators.
This project is developed as part of an advanced programming challenge and demonstrates clean UI/UX, modular Kotlin code, and extended functionality beyond typical calculators.
- ➕ Addition
- ➖ Subtraction
- ✖️ Multiplication
- ➗ Division
- 🟰 Decimal number support
-
@ operator – Percentage:
Example:
100 @ 20
→ Calculates 20% of 100 →20
-
% operator – Modulus (Remainder):
Example:
7 % 3
→1
- Android Studio (Giraffe or newer)
- Kotlin 1.8+
- Android SDK 33+
- Minimum SDK: 21 (Android 5.0)
- Clone the repository:
git clone https://github.com/YOUR_USERNAME/CalculatorX.git
-
Open the project in Android Studio
-
Click Run
▶️ on your emulator or physical device
No external libraries required. 100% Kotlin + Jetpack components.
CalculatorX/
├── app/
│ ├── src/
│ │ ├── main/
│ │ │ ├── java/com/yourdomain/calculatorx/
│ │ │ │ ├── ui/ # Main UI and event handling
│ │ │ │ ├── logic/ # Calculation logic and operator mapping
│ │ │ │ └── MainActivity.kt
│ │ │ └── res/
│ │ │ ├── layout/ # calculator UI XML
│ │ │ ├── values/ # colors, strings, themes
│ │ │ └── drawable/ # icons and visuals
├── build.gradle.kts
└── AndroidManifest.xml
- Kotlin
- Android Jetpack
- ViewBinding
- ConstraintLayout
- Material Design
- This calculator is built to be extensible — you can easily add new operators or scientific features.
- Touch-friendly UI, responsive grid layout, and precise result formatting.
Developed with ❤️ by ali johari