SplashScreenView

public final class SplashScreenView
extends FrameLayout

java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ android.window.SplashScreenView


The view which allows an activity to customize its splash screen exit animation.

Activities will receive this view as a parameter of SplashScreen.OnExitAnimationListener#onSplashScreenExit if they set SplashScreen#setOnExitAnimationListener. When this callback is called, this view will be on top of the activity.

This view is composed of a view containing the splashscreen icon (see windowSplashscreenAnimatedIcon) and a background. Developers can use getIconView() to get this view and replace the drawable or add animation to it. The background of this view is filled with a single color, which can be edited during the animation by View#setBackground or View#setBackgroundColor.

See also:

Summary

Inherited XML attributes

Inherited constants

Inherited fields

Public methods

long getIconAnimationDurationMillis()

Returns the duration of the icon animation if icon is animatable.

long getIconAnimationStartMillis()

If the replaced icon is animatable, return the animation start time in millisecond based on system.

View getIconView()

Get the view containing the Splash Screen icon and its background.

void remove()

Remove this view and release its resource.

Inherited methods

Public methods

getIconAnimationDurationMillis

public long getIconAnimationDurationMillis ()

Returns the duration of the icon animation if icon is animatable.

Returns
long

getIconAnimationStartMillis

public long getIconAnimationStartMillis ()

If the replaced icon is animatable, return the animation start time in millisecond based on system. The start time is set using SystemClock#uptimeMillis().

Returns
long

getIconView

public View getIconView ()

Get the view containing the Splash Screen icon and its background.

Returns
View This value may be null.

remove

public void remove ()

Remove this view and release its resource.

Do not invoke this method from a drawing method (View.onDraw(android.graphics.Canvas) for instance).