Conversation
…er name casing preservation and to update splash.xml with project name post-creation, corrected navigation issue in `NavigationRoot.kt`
…figuring certain types of files (class files, manifests, and resources), Minor formatting in `themes.xml` and `Theme.kt`
There was a problem hiding this comment.
Pull Request Overview
This PR adds splash screen functionality to the Android template while improving the project setup automation. It introduces a splash screen theme configuration and refactors the cleanup script to better handle name casing preservation and modularize configuration functions.
- Adds splash screen support with new
splash.xmlresource file and theme configuration - Refactors
cleanup.gradle.ktsto use modular functions and preserve case-sensitive naming for class files - Updates navigation setup to include a basic home route composable
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| buildSrc/src/main/kotlin/cleanup.gradle.kts | Refactored to use separate functions for each configuration step and preserve name casing |
| app/src/main/res/values/themes.xml | Removed empty line formatting |
| app/src/main/res/values/splash.xml | Added new splash screen theme configuration |
| app/src/main/java/com/codermp/composeandroidtemplate/core/presentation/designsystem/theme/Theme.kt | Removed commented color override examples |
| app/src/main/java/com/codermp/composeandroidtemplate/app/navigation/NavigationRoot.kt | Added missing import and empty home route composable |
| app/src/main/AndroidManifest.xml | Updated theme references to use splash screen theme |
| <!-- TODO: Add your windowSplashScreenBackground color property--> | ||
| <!-- TODO: Add your windowSplashScreenAnimatedIcon drawable property--> | ||
| <item name="windowSplashScreenBackground">@color/purple_700</item> | ||
| <item name="windowSplashScreenAnimatedIcon">@drawable/ic_launcher_foreground</item> |
There was a problem hiding this comment.
The splash screen is referencing @drawable/ic_launcher_foreground which may not exist in all template configurations. This could cause runtime crashes if the drawable is missing. Consider using a more reliable default or adding validation.
| <item name="windowSplashScreenAnimatedIcon">@drawable/ic_launcher_foreground</item> | |
| <item name="windowSplashScreenAnimatedIcon">@mipmap/ic_launcher</item> |
| <item name="android:actionBarStyle">@style/Theme.AppCompat.NoActionBar</item> | ||
| <!-- TODO: Add your windowSplashScreenBackground color property--> | ||
| <!-- TODO: Add your windowSplashScreenAnimatedIcon drawable property--> | ||
| <item name="windowSplashScreenBackground">@color/purple_700</item> |
There was a problem hiding this comment.
The splash screen is referencing @color/purple_700 which may not be defined in the project's color resources. This could cause compilation errors or runtime crashes if the color resource is missing.
| oldValue = "Compose Android Template", | ||
| newValue = name.split("-", "_") | ||
| .joinToString(" ") { it.replaceFirstChar { char -> char.uppercaseChar() } } | ||
| oldValue = "Compose Android Template", newValue = name |
There was a problem hiding this comment.
[nitpick] The replacement uses the raw name parameter which may not be user-friendly for display purposes. Consider using a formatted version that converts kebab-case or snake_case to proper title case for better readability in the app name.
🚀 Description
PR includes the following changes:
splash.xmlfileAndroidManifest.xmlcleanup.gradle.ktsto have:NavigationRoot.kt📄 Motivation and Context
This PR better stabilizes the
compose-android-templaterepo, corrects some missed configuration errors, and further minimizes post-creation setup by the user.🧪 How Has This Been Tested?
📷 Screenshots (if appropriate)
📦 Types of changes
✅ Checklist