Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement splash screen using Core Splashscreen library #11710

Closed

Conversation

Isira-Seneviratne
Copy link
Member

@Isira-Seneviratne Isira-Seneviratne commented Nov 16, 2024

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

This PR implements the app splash screen using the Core Splashscreen library. This allows a splash screen similar to that automatically generated on Android 12 and later to be displayed on older versions of Android. On Android 12 and later, an animated logo is used.

More information on Android 12's splash screen functionality: Splash screens

  • Note: The app icon is not displayed on Android 5.0 and 5.1. This is a known limitation.

Before/After Screenshots/Screen Record

  • Before:

All versions of Android:

Screen_recording_20241116_143747.mp4
  • After:

Android 5.0

Screen_recording_20241116_143153.webm

Android 6.0

Screen_recording_20241116_143343.webm

Android 15 (light theme)

Screen_recording_20241122_081416.mp4

Android 15 (dark theme)

Screen_recording_20241122_081529.mp4

Fixes the following issue(s)

  • Fixes #

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions bot added the size/medium PRs with less than 250 changed lines label Nov 16, 2024
@opusforlife2 opusforlife2 added rewrite Issues and PRs related to rewrite GUI Issue is related to the graphical user interface labels Nov 16, 2024
@Jean-BaptisteC
Copy link

Can you test on a Samsung devices ?
Because I know somes samsung devices shown app icon cut on splashscreen
Exemple here Exodus-Privacy/exodus-android-app#362

@Isira-Seneviratne
Copy link
Member Author

Isira-Seneviratne commented Nov 18, 2024

Can you test on a Samsung devices ?
Because I know somes samsung devices shown app icon cut on splashscreen
Exemple here Exodus-Privacy/exodus-android-app#362

That doesn't seem to be necessary here, as this icon doesn't have a background (which is why the Theme.SplashScreen.IconBackground theme is used here).

More information: https://developer.android.com/reference/kotlin/androidx/core/splashscreen/SplashScreen#themes

This might be the issue with your splash screen: "On API < 31, if the value of windowSplashScreenAnimatedIcon is an adaptive icon , it will be cropped and scaled."

@Profpatsch
Copy link
Contributor

My Pixel 6 is on Android 14, and there is not splash screen, it just enlarges the icon a little and then starts after maybe one second.

Is it really necessary to add another dependency to implement a feature that is just nice-to-have? According to https://composables.com/android-distribution-chart more than half of devices are already on version 12 or later, so this code will be relevant maybe for a year or two.

@Profpatsch
Copy link
Contributor

Profpatsch commented Nov 19, 2024

I guess removing the splash screen activity is a nice benefit, but maybe we don’t need a splash screen on older devices in the first place?

@Isira-Seneviratne
Copy link
Member Author

My Pixel 6 is on Android 14, and there is not splash screen, it just enlarges the icon a little and then starts after maybe one second.

That's strange, Android 14 should natively support the splash screen.

@Isira-Seneviratne
Copy link
Member Author

I guess removing the splash screen activity is a nice benefit, but maybe we don’t need a splash screen on older devices in the first place?

The duration it is visible can be customised, so it could be used to mask the home screen's video loading process (if such a feature is needed).

# Conflicts:
#	app/build.gradle
@Stypox
Copy link
Member

Stypox commented Nov 27, 2024

Mmmh I also think this is not so useful. Sure, animations are nice, but I don't see a big issue with the current splashscreen. At some point we could even remove the current splashscreen and use the default provided since Android 12+, to make things simpler. Thank you anyway for the proposal!

@Stypox Stypox closed this Nov 27, 2024
@Isira-Seneviratne Isira-Seneviratne deleted the Splash-screen branch November 29, 2024 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI Issue is related to the graphical user interface rewrite Issues and PRs related to rewrite size/medium PRs with less than 250 changed lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants