Skip to main content
You can add a custom splash Fragment in your application with the Choicely SDK. The splash Fragment can display your branding, animations, or custom logic before the main content loads.

Steps to Add a Custom Splash Fragment

1. Create a Splash Fragment

Create a new fragment that extends AbstractSplashFragment. This is where you’ll define your splash Fragment’s layout and any custom logic.

2. Create a Splash Factory

Create a factory class that implements ChoicelySplashFactory. This factory is responsible for providing an instance of your custom splash fragment.

3. Add the Factory in Your Application Class

Finally, in your Application class (e.g., YourApplication.java or YourApplication.kt), add a call to ChoicelySDK.factory().setSplashFactory() to use your custom splash Fragment.
Remember to create a layout file named fragment_custom_splash.xml in your res/layout directory to define the visual elements of your splash Fragment, such as an image, text, or a animation view.