INNER CODE UNIT · Kotlin

onCreate

1812z/HyperIsland · android/app/src/main/kotlin/io/github/hyperisland/MainActivity.kt:35

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val prefs = FlutterPrefsRepository(this)
        val isNewUser = !prefs.getBoolean("pref_onboarding_completed", false)
        val privacyPolicyAcceptedAtLaunch = PrivacyConsentStore.isAccepted(this)
        window.clearFlags(
            WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS or
                WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION,
        )
        window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
        val systemInDarkTheme =
            resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK ==
                Configuration.UI_MODE_NIGHT_YES
        val useDarkSystemBars = when (prefs.getString("pref_theme_mode", "system")) {
            "light" -> false
            "dark" -> true
            else -> systemInDarkTheme
        }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…