# SplashScreen.KeepOnScreenCondition

Artifact: [androidx.core:core-splashscreen](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/splashscreen/SplashScreen.kt+class:androidx.core.splashscreen.SplashScreen.KeepOnScreenCondition) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

*** ** * ** ***


```
public fun interface SplashScreen.KeepOnScreenCondition
```

<br />

*** ** * ** ***

Condition evaluated to check if the splash screen should remain on screen

The splash screen will stay visible until the condition isn't met anymore. The condition is evaluated before each request to draw the application, so it needs to be fast to avoid blocking the UI.

## Summary

| ### Public methods |
|---|---|
| `abstract boolean` | `@https://developer.android.com/reference/androidx/annotation/MainThread https://developer.android.com/reference/androidx/core/splashscreen/SplashScreen.KeepOnScreenCondition#shouldKeepOnScreen()()` Callback evaluated before every requests to draw the Activity. |

## Public methods

### shouldKeepOnScreen

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

```
@MainThread
abstract boolean shouldKeepOnScreen()
```

Callback evaluated before every requests to draw the Activity. If it returns `true`, the splash screen will be kept visible to hide the Activity below.

This callback is evaluated in the main thread.