initial commit

This commit is contained in:
2026-05-26 00:51:07 -07:00
commit be631985cb
31 changed files with 1157 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
# CLAUDE.md - Countdown Timer
## Build & Test Commands
- **Build Debug APK**: `./gradlew assembleDebug`
- **Build Release APK**: `./gradlew assembleRelease`
- **Clean Project**: `./gradlew clean`
- **Run Unit Tests**: `./gradlew test` (if applicable)
## Code Style Guidelines
- **Language**: Kotlin 1.9+
- **UI Framework**: Traditional Android View system (XML layouts), **not** Jetpack Compose.
- **Naming Conventions**:
- Classes: `PascalCase` (e.g., `CountdownDialog`)
- Functions/Variables: `camelCase` (e.g., `startTimer()`)
- Layout Files: `snake_case` (e.g., `activity_main.xml`)
- Resource IDs: `snake_case` (e.g., `btn_start`)
- **Android Patterns**: Use `findViewById` for view binding in this project to maintain consistency with existing simple architecture.
## Architecture
- **Pattern**: Simple Activity-Dialog architecture.
- **State**: The countdown state is managed locally within `CountdownDialog` using `android.os.CountDownTimer`.
- **Dependency Management**: Gradle with Groovy DSL.
- **Key Constraints**:
- The `CountdownDialog` is explicitly set to `setCancelable(false)` and `setCanceledOnTouchOutside(false)` to ensure the timer completes.
## Critical Files Reference
- `app/src/main/java/com/example/countdowntimer/MainActivity.kt`: Entry point and trigger for the timer.
- `app/src/main/java/com/example/countdowntimer/CountdownDialog.kt`: Implementation of the countdown logic and `ToneGenerator` trigger.
- `app/src/main/res/layout/activity_main.xml`: Main screen layout.
- `app/src/main/res/layout/dialog_countdown.xml`: Timer dialog layout.
- `app/build.gradle`: Build configuration, SDK versions (minSdk 24, targetSdk 34), and dependencies.