Skip to content

Merge bugfix/splash-screen-setup into main#4

Merged
CoderMP merged 2 commits intomainfrom
bugfix/splash-screen-setup
Aug 6, 2025
Merged

Merge bugfix/splash-screen-setup into main#4
CoderMP merged 2 commits intomainfrom
bugfix/splash-screen-setup

Conversation

@CoderMP
Copy link
Copy Markdown
Owner

@CoderMP CoderMP commented Aug 6, 2025

🚀 Description

PR includes the following changes:

  • Adds splash.xml file
  • Adds splashscreen theme to AndroidManifest.xml
  • Refactors cleanup.gradle.kts to have:
    • Particular functions for each step of file configuration
    • Maintain name casing preservation for class files
  • Corrects navigation-related issue in NavigationRoot.kt

📄 Motivation and Context

This PR better stabilizes the compose-android-template repo, 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

  • Bug fix (non-breaking change which fixes an issue)
  • Version Bump (non-breaking change which bumps the version)
  • New feature (non-breaking change which adds functionality)
  • New utility (non-breaking change which supplements functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

✅ Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

CoderMP added 2 commits August 6, 2025 09:34
…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`
@CoderMP CoderMP requested a review from Copilot August 6, 2025 18:42
@CoderMP CoderMP self-assigned this Aug 6, 2025

This comment was marked as outdated.

@CoderMP CoderMP requested a review from Copilot August 6, 2025 18:50

This comment was marked as outdated.

@CoderMP CoderMP requested a review from Copilot August 6, 2025 19:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.xml resource file and theme configuration
  • Refactors cleanup.gradle.kts to 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>
Copy link

Copilot AI Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_launcher_foreground</item>
<item name="windowSplashScreenAnimatedIcon">@mipmap/ic_launcher</item>

Copilot uses AI. Check for mistakes.
<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>
Copy link

Copilot AI Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
oldValue = "Compose Android Template",
newValue = name.split("-", "_")
.joinToString(" ") { it.replaceFirstChar { char -> char.uppercaseChar() } }
oldValue = "Compose Android Template", newValue = name
Copy link

Copilot AI Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Copilot uses AI. Check for mistakes.
@CoderMP CoderMP merged commit 0d37379 into main Aug 6, 2025
4 checks passed
@CoderMP CoderMP deleted the bugfix/splash-screen-setup branch August 6, 2025 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants