-
-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update splash screen to properly use the Androidx SplashScreen library (
#4413) The Androidx SplashScreen library is added as a dependency to the project but isn't properly enabled in the current code. This pull request configures the splash screen properly. - Remove `SplashScreenActivity` which is not needed and use `MainActivity` as main entry point to the application. `MainActivity` inherits from `BaseActivity` which already detects if no account is configured and redirects to `LoginActivity` if needed, just like `SplashScreenActivity`. - Initialize the SplashScreen library in `MainActivity.onCreate()`. - Instead of letting the SplashScreen library set the final theme from the `postSplashScreenTheme` attribute in SplashTheme, let `BaseActivity` set it according to the user settings. - When no account is available in `MainActivity.onCreate()`, keep the splash screen shown until `LoginActivity` appears. - Disable the slide-in animation when launching `LoginActivity` when no account is available because the detection happens in `onCreate()` and an Activity that finishes itself in `onCreate()` will not be drawn, so the slide-in animation will not be visible either and only `LoginActivity` will appear. - Upgrade `core-splashscreen` to 1.2.0-alpha01 which contains a fix for corrupted app theme on API 31+.
- Loading branch information
Showing
6 changed files
with
22 additions
and
69 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
47 changes: 0 additions & 47 deletions
47
app/src/main/java/com/keylesspalace/tusky/SplashActivity.kt
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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