Rules Hub
Code Ruleset
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Implement the Android splash via a launcher theme, not a SplashActivity
Use android:windowBackground on the launch theme (or the SplashScreen API) instead of a dedicated SplashActivity that adds a redundant screen and delay.
Bad example
| 1 | class SplashActivity : Activity { /* waits, then starts Main */ } |
Explanation (EN)
A redundant splash activity adds a navigation hop and can prolong startup.
Objašnjenje (HR)
Good example
| 1 | <style name="AppTheme.Launcher"><item name="android:windowBackground">@drawable/splash</item></style> |
Explanation (EN)
Objašnjenje (HR)
Notes (EN)
When a launch activity exists only to display a splash while starting the real activity, use the platform splash mechanism appropriate to supported Android versions.
Exceptions / Tradeoffs (EN)
Retain an activity with a genuine navigation or authentication responsibility; follow current platform guidance for Android 12+ splash behavior.