public static interface FlutterActivityDelegate.ViewFactory
FlutterActivityDelegate
.
A delegate's view factory will be consulted during FlutterActivityDelegate.onCreate(Bundle)
. If it returns
null
, then the delegate will fall back to instantiating a new full-screen FlutterView
.
A delegate's native view factory will be consulted during FlutterActivityDelegate.onCreate(Bundle)
. If it
returns null
, then the delegate will fall back to instantiating a new FlutterNativeView
. This is useful for applications to override to reuse the FlutterNativeView
held e.g. by a pre-existing background service.
Modifier and Type | Method and Description |
---|---|
FlutterNativeView |
createFlutterNativeView() |
FlutterView |
createFlutterView(Context context) |
boolean |
retainFlutterNativeView()
Hook for subclasses to indicate that the
FlutterNativeView returned by createFlutterNativeView() should not be destroyed when this activity is destroyed. |
FlutterView createFlutterView(Context context)
FlutterNativeView createFlutterNativeView()
boolean retainFlutterNativeView()
FlutterNativeView
returned by createFlutterNativeView()
should not be destroyed when this activity is destroyed.