TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Niurka77/tf-app/llms.txt
Use this file to discover all available pages before exploring further.
@capacitor/splash-screen plugin controls the native loading screen displayed on Android while the Capacitor WebView initializes and your Vite app boots. TF-App uses version ^7.0.1 of this plugin, configured entirely through the plugins.SplashScreen block in capacitor.config.json. No Java or Kotlin changes are needed for the options documented on this page.
SplashScreen Configuration Block
Option Reference
How long the splash screen remains visible, in milliseconds, before it is automatically hidden. Only applies when
launchAutoHide is true.Current value: 2000 (2 seconds)When
true, the splash screen dismisses itself after launchShowDuration milliseconds. When false, the splash persists indefinitely until you call SplashScreen.hide() manually from JavaScript — useful for hiding the splash only after your data has loaded.Current value: trueThe hex color used as the splash screen background on Android. This fills the area behind the splash image drawable, so it shows through any transparent regions in the PNG.Current value:
#1E88E5 (Material Blue 600)The name (without extension) of the drawable resource file used as the splash image. Capacitor looks for this file in
android/app/src/main/res/drawable*/. The default drawable directories are drawable, drawable-land-hdpi, drawable-land-mdpi, etc.Current value: splash → resolves to splash.png in each drawable folderControls how the splash drawable is scaled to fit the screen. Mirrors Android’s
Current value:
ImageView.ScaleType enum.| Value | Behavior |
|---|---|
CENTER | Centers the image at its natural size; does not scale. |
CENTER_CROP | Scales uniformly to fill the screen; may crop edges. |
CENTER_INSIDE | Scales down to fit within the screen; never upscales. |
FIT_CENTER | Scales to fit within the screen, maintaining aspect ratio. |
FIT_START | Same as FIT_CENTER but aligned to the top-left. |
FIT_END | Same as FIT_CENTER but aligned to the bottom-right. |
FIT_XY | Stretches the image to fill the screen exactly; distorts if aspect ratio differs. |
CENTERWhen
true, renders a loading spinner on top of the splash image while the WebView loads.Current value: falseStyle of the Android spinner when
showSpinner is true. Accepted values: horizontal, small, large, inverse, smallInverse, largeInverse.Current value: horizontalStyle of the iOS spinner when
showSpinner is true. Accepted values: small, large.Current value: smallTF-App targets Android only — there is no iOS project in this repository. This option is present in
capacitor.config.json but has no effect on TF-App builds. It is safe to leave it in place if you plan to add an iOS target in the future.Hex color applied to the loading spinner when
showSpinner is true. Applies to both Android and iOS.Current value: #FFFFFF (white)When
true, hides the Android status bar (the top bar showing time and notifications) for the duration of the splash screen, giving the launch screen a full-height appearance.Current value: trueWhen
true, hides both the status bar and the bottom navigation bar during the splash screen, providing a fully immersive full-screen launch experience.Current value: trueThe name of the Android layout XML file to use as the splash screen layout. Capacitor looks for this in
android/app/src/main/res/layout/. The default Capacitor-generated layout is launch_screen.Current value: launch_screenWhen
true, applies the backgroundColor behind the adaptive icon on API 31+ devices that use the Android 12 splash screen API. Ensures consistent branding on newer devices.Current value: trueA CSS gradient string used as the splash background when running TF-App in a desktop browser (e.g.,
npm run dev or npm run preview). This value has no effect on the compiled Android APK — it is a browser-only preview aid.Current value: linear-gradient(135deg, #1E88E5 0%, #0D47A1 100%)webLinearGradient only affects how the splash looks in a browser preview session. The Android native splash screen uses backgroundColor and the drawable resource specified in androidSplashResourceName. Changes to webLinearGradient require no cap sync.Hiding the Splash Manually
By default, TF-App auto-hides the splash after 2000 ms (launchAutoHide: true). For a smoother experience — especially on screens that fetch data before rendering — you can take manual control:
Call SplashScreen.hide() when ready
Import the plugin and hide the splash after your data or view is fully initialized:
Replacing the Splash Image
The splash image is a set of PNG drawables stored in the Android resource directories. To replace the default Capacitor splash with TF-App’s branded artwork:Generate correctly sized assets
Each density bucket requires a different pixel dimension. Use Android Studio’s Image Asset Studio (File → New → Image Asset → Launch Icons) or a tool like
@capacitor/assets to generate all sizes from a single high-resolution source image (recommended: 2732×2732 px PNG with transparent background).Replace the files
Copy your new
splash.png files into each drawable directory, keeping the filename splash to match androidSplashResourceName in capacitor.config.json.