fix(splash): show app icon instead of generic APK icon on Android 11 - #212
Open
yeasin0423 wants to merge 1 commit into
Open
yeasin0423 wants to merge 1 commit into
yeasin0423 wants to merge 1 commit into
Conversation
Theme.Splash only set postSplashScreenTheme, so Android 12+ filled the launcher icon automatically while API 26-30 fell back to a black window with the generic APK placeholder icon. Set windowSplashScreenBackground/AnimatedIcon/IconBackgroundColor plus a legacy windowBackground layer-list, with night-qualified splash_background (white day / black night). Add per-density splash_foreground (tighter crop of the launcher art, mask-safe margins) since the launcher foreground fills only ~47% of its canvas and rendered tiny; launcher adaptive icon untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Android 12+ the platform fills the launcher icon into the splash automatically, but on Android 11 and below the app opened with a black window and the generic APK placeholder icon in the center.
Root cause: Theme.Splash only set postSplashScreenTheme, leaving the compat splash (androidx core-splashscreen, API 26–30) with no background or icon.
This sets windowSplashScreenBackground / AnimatedIcon / IconBackgroundColor plus a legacy windowBackground layer-list, with night-qualified background (white day / black night), and adds a tighter-cropped splash_foreground since the launcher foreground art fills only ~47% of its canvas.