# SplashScreenViewProvider

# SplashScreenViewProvider

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/SplashScreenViewProvider.kt+class:androidx.core.splashscreen.SplashScreenViewProvider)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/splashscreen/SplashScreenViewProvider "View this page in Java")

<br />

```
class SplashScreenViewProvider
```

<br />

*** ** * ** ***

Contains a copy of the splash screen used to create a custom animation from the splash screen to the application.

The splashscreen is accessible using[SplashScreenViewProvider.view](https://developer.android.com/reference/kotlin/androidx/core/splashscreen/SplashScreenViewProvider#view())and the view containing the icon using[SplashScreenViewProvider.iconView](https://developer.android.com/reference/kotlin/androidx/core/splashscreen/SplashScreenViewProvider#iconView()).

This class also contains time information about the animated icon (for API 31+).

The application always needs to call[SplashScreenViewProvider.remove](https://developer.android.com/reference/kotlin/androidx/core/splashscreen/SplashScreenViewProvider#remove())once it's done with it.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [remove](https://developer.android.com/reference/kotlin/androidx/core/splashscreen/SplashScreenViewProvider#remove())`()` Remove the SplashScreen's view from the view hierarchy. |

|                             ### Public properties                             |
|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | [iconAnimationDurationMillis](https://developer.android.com/reference/kotlin/androidx/core/splashscreen/SplashScreenViewProvider#iconAnimationDurationMillis()) Duration of the icon animation as provided in \[R.attr.                                                                                                                     |
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | [iconAnimationStartMillis](https://developer.android.com/reference/kotlin/androidx/core/splashscreen/SplashScreenViewProvider#iconAnimationStartMillis()) Start time of the icon animation.                                                                                                                                                 |
| [View](https://developer.android.com/reference/android/view/View.html)        | [iconView](https://developer.android.com/reference/kotlin/androidx/core/splashscreen/SplashScreenViewProvider#iconView()) The view containing the splashscreen icon as defined by[R.attr.windowSplashScreenAnimatedIcon](https://developer.android.com/reference/kotlin/androidx/core/splashscreen/R.attr#windowSplashScreenAnimatedIcon()) |
| [View](https://developer.android.com/reference/android/view/View.html)        | [view](https://developer.android.com/reference/kotlin/androidx/core/splashscreen/SplashScreenViewProvider#view()) The splash screen view, copied into this application process.                                                                                                                                                             |

## Public functions

### remove

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

```
fun remove(): Unit
```

Remove the SplashScreen's view from the view hierarchy.

This always needs to be called when an[androidx.core.splashscreen.SplashScreen.OnExitAnimationListener](https://developer.android.com/reference/kotlin/androidx/core/splashscreen/SplashScreen.OnExitAnimationListener)is set.  

## Public properties

### iconAnimationDurationMillis

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

```
val iconAnimationDurationMillis: Long
```

Duration of the icon animation as provided in \[R.attr.  

### iconAnimationStartMillis

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

```
val iconAnimationStartMillis: Long
```

Start time of the icon animation.

On API 31+, returns the number of millisecond since the Epoch time (1970-1-1T00:00:00Z)

Below API 31, returns 0 because the icon cannot be animated.  

### iconView

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

```
val iconView: View
```

The view containing the splashscreen icon as defined by[R.attr.windowSplashScreenAnimatedIcon](https://developer.android.com/reference/kotlin/androidx/core/splashscreen/R.attr#windowSplashScreenAnimatedIcon())  

### view

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

```
val view: View
```

The splash screen view, copied into this application process.

This view can be used to create custom animation from the splash screen to the application