Repository navigation
feat: use the androidx splash screen on app start - #6937
Draft
AndyScherzinger wants to merge 2 commits into
Draft
AndyScherzinger wants to merge 2 commits into
AndyScherzinger wants to merge 2 commits into
Conversation
Contributor
📱 QA build
The QA build installs alongside a released Nextcloud app, so you can keep Downloading the file requires a GitHub account, so open this link on the |
5 of 7 tasks
AndyScherzinger
force-pushed
the
feat/noid/androidx-splashscreen
branch
3 times, most recently
from
October 23, 2026 15:33
dfdbcb4 to
2d08f9e
Compare
Show the launch screen through androidx.core:core-splashscreen, as the Nextcloud Files app does, instead of a launch theme with a layer-list window background: - MainActivity uses Theme.App.Starting (Theme.SplashScreen with the launcher foreground on the primary color) and calls installSplashScreen() before super.onCreate(), which also switches to AppTheme, so the manual setTheme() is gone - the splash screen stays until the intent is routed, so the empty layout of MainActivity no longer shows between the system splash screen and the next screen on Android 12+ - the application theme is AppTheme; AppTheme.Launcher and its launch_screen drawable are removed Unlike the Files app, no branding text is shown, only the logo. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
MainActivity only routes intents and never shows content of its own: its layout was an empty toolbar, and ActionBarProvider, implemented only by MainActivity, had no callers. Without the layout, nothing but the window background is left behind the transition to the next screen once the splash screen is gone, and starting skips inflating the toolbar. The only use of the layout was the snackbar for a contact whose server has no account, shown underneath the conversation list that handleIntent() opens at the same time. Show it as a toast instead, so it is visible. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AndyScherzinger
force-pushed
the
feat/noid/androidx-splashscreen
branch
from
October 26, 2026 07:18
2d08f9e to
9fef24e
Compare
Contributor
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.
Switches the launch screen to
androidx.core:core-splashscreen, the same approach the Nextcloud Files app uses (LauncherActivity+Theme.App.Starting), but showing only the logo, without the Files app's optional branding text.Before: the whole application used
AppTheme.Launcher, whose window background was a layer-list (launch_screen.xml: primary color +ic_logo).MainActivityswitched toAppThemeby hand. On Android 12+ the system splash screen (launcher icon) was dismissed as soon asMainActivitydrew, so the empty toolbar layout ofMainActivityshowed until the users were loaded and the next screen opened.After:
MainActivityusesTheme.App.Starting(parentTheme.SplashScreen): primary background,ic_launcher_foregroundas the icon (so the QA flavor keeps its own icon),postSplashScreenTheme=AppTheme.MainActivity.onCreate()callsinstallSplashScreen()beforesuper.onCreate(), which also switches toAppTheme; the manualsetTheme()is gone.setKeepOnScreenConditionkeeps the splash screen until the intent has been routed (normal start and deep links, including error paths), so the emptyMainActivitylayout no longer flashes between the splash screen and the next screen. This is the one difference from the Files app, whose launcher layout is a plain primary-colored screen.AppTheme(main and gplay manifests);AppTheme.Launcherandlaunch_screen.xmlare removed. All other activities already set their own theme.Second commit:
MainActivityonly routes and never shows content of its own, so its layout (activity_main.xml, an empty toolbar) is removed, together withActionBarProvider, which onlyMainActivityimplemented and nothing called. Behind the transition to the next screen only the window background is left, and starting skips inflating the toolbar. The one use of the layout was the snackbar for a phone book contact whose server has no matching account; it was shown underneath the conversation list thathandleIntent()opens at the same time, so it is now a toast.Checks: gplay and generic build; ktlint clean; lint unchanged against master (15 errors, 138 warnings, 7 hints); detekt only reports the existing
CyclomaticComplexMethodonhandleIntent(17/15, same on master). Verification metadata needed no update (AndroidX is covered by Google's key).🖼️ Screenshots
🚧 TODO
nextcloudtalk://), app shortcut and contact integration (incl. a contact of a server without account: toast)MainActivityTest,LoginIT)🏁 Checklist
/backport to stable-xx.x🤖 AI (if applicable)