Package io.flutter.embedding.android
Class DrawableSplashScreen
- java.lang.Object
-
- io.flutter.embedding.android.DrawableSplashScreen
-
- All Implemented Interfaces:
SplashScreen
@Deprecated public final class DrawableSplashScreen extends Object implements SplashScreen
Deprecated.SplashScreen
that displays a givenDrawable
, which then fades its alpha to zero when instructed totransitionToFlutter(Runnable)
.Please use the new Splash screen API available on Android S. On lower versions of Android, it's no longer necessary to display a splash screen to wait for the Flutter first frame.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DrawableSplashScreen.DrawableSplashScreenView
Deprecated.
-
Constructor Summary
Constructors Constructor Description DrawableSplashScreen(Drawable drawable)
Deprecated.Constructs aDrawableSplashScreen
that displays the givendrawable
and crossfades to Flutter content in 500 milliseconds.DrawableSplashScreen(Drawable drawable, ImageView.ScaleType scaleType, long crossfadeDurationInMillis)
Deprecated.Constructs aDrawableSplashScreen
that displays the givendrawable
and crossfades to Flutter content in the givencrossfadeDurationInMillis
.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description View
createSplashView(Context context, Bundle savedInstanceState)
Deprecated.Creates aView
to be displayed as a splash screen before Flutter renders its first frame.void
transitionToFlutter(Runnable onTransitionComplete)
Deprecated.Invoked by Flutter when Flutter has rendered its first frame, and would like thesplashView
to disappear.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.flutter.embedding.android.SplashScreen
doesSplashViewRememberItsTransition, saveSplashScreenState
-
-
-
-
Constructor Detail
-
DrawableSplashScreen
public DrawableSplashScreen(@NonNull Drawable drawable)
Deprecated.Constructs aDrawableSplashScreen
that displays the givendrawable
and crossfades to Flutter content in 500 milliseconds.- Parameters:
drawable
- A drawable to display on the Splash screen view.
-
DrawableSplashScreen
public DrawableSplashScreen(@NonNull Drawable drawable, @NonNull ImageView.ScaleType scaleType, long crossfadeDurationInMillis)
Deprecated.Constructs aDrawableSplashScreen
that displays the givendrawable
and crossfades to Flutter content in the givencrossfadeDurationInMillis
.- Parameters:
drawable
- TheDrawable
to be displayed as a splash screen.scaleType
- TheImageView.ScaleType
to be applied to theDrawable
when theDrawable
is displayed full-screen.crossfadeDurationInMillis
- Duration of the crossfade in milliseconds.
-
-
Method Detail
-
createSplashView
@Nullable public View createSplashView(@NonNull Context context, @Nullable Bundle savedInstanceState)
Deprecated.Description copied from interface:SplashScreen
Creates aView
to be displayed as a splash screen before Flutter renders its first frame.This method can be called at any time, and may be called multiple times depending on Android configuration changes that require recreation of a view hierarchy. Implementers that provide a stateful splash view, such as one with animations, should take care to migrate that animation state from the previously returned splash view to the newly created splash view.
- Specified by:
createSplashView
in interfaceSplashScreen
- Parameters:
context
- The current context. e.g. The activity.savedInstanceState
- If the activity is being re-initialized after previously being shut down then this Bundle contains the data it most recently supplied inonSaveInstanceState(Bundle)
.- Returns:
- The splash screen view.
-
transitionToFlutter
public void transitionToFlutter(@NonNull Runnable onTransitionComplete)
Deprecated.Description copied from interface:SplashScreen
Invoked by Flutter when Flutter has rendered its first frame, and would like thesplashView
to disappear.The provided
onTransitionComplete
callback must be invoked when the splashView
has finished transitioning itself away. The splashView
will be removed and destroyed when the callback is invoked.- Specified by:
transitionToFlutter
in interfaceSplashScreen
- Parameters:
onTransitionComplete
- The callback after the transition has completed.
-
-