{"id":21730133,"url":"https://github.com/nventive/extendedsplashscreen","last_synced_at":"2025-06-11T12:08:06.321Z","repository":{"id":42424621,"uuid":"261814852","full_name":"nventive/ExtendedSplashScreen","owner":"nventive","description":"Display a loading indicator on top of the native mobile splash screen during your app initialization","archived":false,"fork":false,"pushed_at":"2025-05-20T14:17:44.000Z","size":1040,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":26,"default_branch":"main","last_synced_at":"2025-06-07T17:52:53.897Z","etag":null,"topics":["android","dotnet","ios","mobile","uno-platform","uwp"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nventive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-05-06T16:19:23.000Z","updated_at":"2025-05-20T14:18:34.000Z","dependencies_parsed_at":"2023-01-30T20:00:39.066Z","dependency_job_id":"579b48f3-e663-4eab-9ea4-6321fee45ff2","html_url":"https://github.com/nventive/ExtendedSplashScreen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"nventive/Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nventive%2FExtendedSplashScreen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nventive%2FExtendedSplashScreen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nventive%2FExtendedSplashScreen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nventive%2FExtendedSplashScreen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nventive","download_url":"https://codeload.github.com/nventive/ExtendedSplashScreen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nventive%2FExtendedSplashScreen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259262623,"owners_count":22830560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","dotnet","ios","mobile","uno-platform","uwp"],"created_at":"2024-11-26T04:12:31.000Z","updated_at":"2025-06-11T12:08:06.294Z","avatar_url":"https://github.com/nventive.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Extended SplashScreen\nExtended splashscreen allows to control when to dismiss the splashscreen. It also gives the developer the ability to add additional xaml content to display while the application is being loaded.\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](LICENSE)\n ![Version](https://img.shields.io/nuget/v/Nventive.ExtendedSplashScreen.Uno?style=flat-square)\n ![Downloads](https://img.shields.io/nuget/dt/Nventive.ExtendedSplashScreen.Uno?style=flat-square)\n\n## Getting Started\n1. Install the latest version of `Nventive.ExtendedSplashScreen.Uno` or `Nventive.ExtendedSplashScreen.Uno.WinUI`.\n\n1. Setup the root content of the window to be a custom `UserControl` instead of a `Frame`.\n   (We called this `UserControl` **\"Shell\"** in the following steps.)\n    ``` c#\t\t\t\n    Shell shell = window.Content as Shell;\n\n    if (shell == null)\n    {\n      shell = new Shell(e);\n\n      window.Content = rootFrame;\n    }\n    ```\n\n1. In the `UserControl`, put the following:\n   - Put a `Frame` (or anything else that you need) to display the app content.\n   - Put the `ExtendedSplashScreen` control.\n   \n   It is important to put the `ExtendedSplashScreen` control _below_ than the `Frame` so that the splash screen hides the app content.\n    ```XML\n    \u003cUserControl x:Class=\"ExtendedSlashScreen.Uno.Samples.Shell\"\n                ...\n                xmlns:splash=\"using:Nventive.ExtendedSplashScreen\"\u003e\n\n      \u003cGrid Background=\"{ThemeResource ApplicationPageBackgroundThemeBrush}\"\u003e\n\n        \u003cFrame x:Name=\"RootNavigationFrame\" /\u003e\n\n        \u003csplash:ExtendedSplashScreen x:Name=\"AppExtendedSplashScreen\" /\u003e\n      \u003c/Grid\u003e\n    \u003c/UserControl\u003e\n    ```\n\n1. Expose the `IExtendedSplashScreen` publicly from the code behind of you `UserControl`.\n\n   In this sample we do it by exposing a `ExtendedSplashScreen` property and containing the `IExtendedSplashScreen` and a static `Instance` property containing the latest instance of the `Shell`.\n    ```C#\n    public sealed partial class Shell : UserControl\n    {\n      public static Shell Instance { get; private set; }\n\n      public Shell(LaunchActivatedEventArgs e)\n      {\n        this.InitializeComponent();\n\n        Instance = this;\n\n    #if WINDOWS_UWP // Legacy - Do this only if you target UWP.\n        AppExtendedSplashScreen.SplashScreen = e?.SplashScreen;\n    #endif\n\n        NavigationFrame.Navigate(typeof(MainPage), e.Arguments);\n      }\n\n      public IExtendedSplashScreen ExtendedSplashScreen =\u003e this.AppExtendedSplashScreen;\n\n      public Frame NavigationFrame =\u003e this.RootNavigationFrame;\n    }\n    ```\n\n1. Add code to dismiss the `ExtendedSplashScreen` for when your app is ready to be displayed.\n\n    ```c#\n    Shell.Instance.ExtendedSplashScreen.Dismiss();\n    ```\n\n1. Create a style for the `ExtendedSplashScreen` control.\n    ```xml\n    \u003cStyle x:Key=\"DefaultExtendedSplashScreenStyle\"\n          TargetType=\"splash:ExtendedSplashScreen\"\u003e\n      \u003cSetter Property=\"Template\"\u003e\n        \u003cSetter.Value\u003e\n          \u003cControlTemplate TargetType=\"splash:ExtendedSplashScreen\"\u003e\n            \u003cGrid x:Name=\"RootGrid\"\u003e\n              \u003cVisualStateManager.VisualStateGroups\u003e\n                \u003cVisualStateGroup x:Name=\"SplashScreenStates\"\u003e\n                  \u003c!-- The Normal visual state represents the state when the extended splash screen is shown. --\u003e\n                  \u003cVisualState x:Name=\"Normal\" /\u003e\n\n                  \u003c!-- The Dismissed visual state represents the state when the extended splash screen is dismissed. --\u003e\n                  \u003cVisualState x:Name=\"Dismissed\"\u003e\n                    \u003cStoryboard\u003e\n                      \u003cObjectAnimationUsingKeyFrames Storyboard.TargetName=\"RootGrid\"\n                                                     Storyboard.TargetProperty=\"Visibility\"\u003e\n              \u003cDiscreteObjectKeyFrame KeyTime=\"0:0:0.150\"\n                                      Value=\"Collapsed\" /\u003e\n                      \u003c/ObjectAnimationUsingKeyFrames\u003e\n                      \u003cDoubleAnimation Storyboard.TargetName=\"RootGrid\"\n                                       Storyboard.TargetProperty=\"Opacity\"\n                                       To=\"0\"\n                                       Duration=\"0:0:0.150\" /\u003e\n                    \u003c/Storyboard\u003e\n                  \u003c/VisualState\u003e\n                \u003c/VisualStateGroup\u003e\n              \u003c/VisualStateManager.VisualStateGroups\u003e\n\n              \u003c!-- This ContentPresenter shows a copy of the native splashscreen. --\u003e\n              \u003cContentPresenter x:Name=\"SplashScreenPresenter\" /\u003e\n\n              \u003c!-- You can add custom content in this template, such as a loading animation. --\u003e\n            \u003c/Grid\u003e\n          \u003c/ControlTemplate\u003e\n        \u003c/Setter.Value\u003e\n      \u003c/Setter\u003e\n    \u003c/Style\u003e\n    ```\n\n1. Apply the style to the `ExtendedSplashScreen` control in your `UserControl`.\n    ```xml\n    \u003csplash:ExtendedSplashScreen x:Name=\"AppExtendedSplashScreen\"\n                                 Style=\"{StaticResource DefaultExtendedSplashScreenStyle}\" /\u003e\n    ```\n   \u003e 💡 You can skip this part if you setup an implicit style.\n\n## Android 12+\nThe native splash screen behavior changes starting at Android 12.\nSee [reference](https://developer.android.com/develop/ui/views/launch/splash-screen).\n\n`ExtendedSplashScreen` supports the Android 12+ behavior.\nYou need to add the following code in your MainActivity.cs to override the default behavior.\n```csharp\npublic sealed class MainActivity : Microsoft.UI.Xaml.ApplicationActivity\n{\n\tprotected override void OnCreate(Bundle bundle)\n\t{\n\t\t// Handle the splash screen transition.\n\t\tNventive.ExtendedSplashScreen.ExtendedSplashScreen.AndroidSplashScreen = AndroidX.Core.SplashScreen.SplashScreen.InstallSplashScreen(this);\n\n\t\t// It's important to call base.OnCreate AFTER setting ExtendedSplashScreen.AndroidSplashScreen.\n\t\tbase.OnCreate(bundle);\n\t}\n}\n```\n\nNote that when you run your app in debug from Visual Studio (or other IDEs), the new SplashScreen icon doesn't show.\nIt shows when you run the app from the launcher (even debug builds).\n\n## Trace Logs\nYou can enable trace logs on the `Nventive.ExtendedSplashScreen` namespace to get more information about the runtime behavior.\n\nYou can override the logger via `ExtendedSplashScreen.Logger`.\nBy default, one is created using the `AmbientLoggerFactory` from the `Uno.Core.Extensions.Logging.Singleton` package.\n\n\n## Changelog\n\nPlease consult the [CHANGELOG](CHANGELOG.md) for more information about version\nhistory.\n\n## License\n\nThis project is licensed under the Apache 2.0 license - see the\n[LICENSE](LICENSE) file for details.\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the process for\ncontributing to this project.\n\nBe mindful of our [Code of Conduct](CODE_OF_CONDUCT.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnventive%2Fextendedsplashscreen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnventive%2Fextendedsplashscreen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnventive%2Fextendedsplashscreen/lists"}