diff --git a/src/main/java/com/infomaniak/lib/core/extensions/AppCompatActivityExtensions.kt b/src/main/java/com/infomaniak/lib/core/extensions/AppCompatActivityExtensions.kt index 8658d47c..b5a3ffe9 100644 --- a/src/main/java/com/infomaniak/lib/core/extensions/AppCompatActivityExtensions.kt +++ b/src/main/java/com/infomaniak/lib/core/extensions/AppCompatActivityExtensions.kt @@ -18,6 +18,7 @@ package com.infomaniak.lib.core.extensions import android.os.Build +import android.view.View import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatDelegate import androidx.core.app.LocaleManagerCompat @@ -43,3 +44,7 @@ private fun AppCompatActivity.noLocalesAreAccepted(): Boolean { } return true } + +fun AppCompatActivity.keepSplashscreenVisibleWhileLoading() { + findViewById(android.R.id.content).viewTreeObserver.addOnPreDrawListener { false } +}