Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
io.flutter.app.FlutterActivityDelegate.ViewFactory Interface Reference
Inheritance diagram for io.flutter.app.FlutterActivityDelegate.ViewFactory:
io.flutter.app.FlutterActivity io.flutter.app.FlutterFragmentActivity

Public Member Functions

FlutterView createFlutterView (Context context)
 
FlutterNativeView createFlutterNativeView ()
 
boolean retainFlutterNativeView ()
 

Detailed Description

Specifies the mechanism by which Flutter views are created during the operation of a
FlutterActivityDelegate
.

A delegate's view factory will be consulted during 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 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.

Definition at line 78 of file FlutterActivityDelegate.java.

Member Function Documentation

◆ createFlutterNativeView()

FlutterNativeView io.flutter.app.FlutterActivityDelegate.ViewFactory.createFlutterNativeView ( )

◆ createFlutterView()

FlutterView io.flutter.app.FlutterActivityDelegate.ViewFactory.createFlutterView ( Context  context)

◆ retainFlutterNativeView()

boolean io.flutter.app.FlutterActivityDelegate.ViewFactory.retainFlutterNativeView ( )

Hook for subclasses to indicate that the FlutterNativeView returned by createFlutterNativeView() should not be destroyed when this activity is destroyed.

Returns
Whether the FlutterNativeView is retained.

Implemented in io.flutter.app.FlutterActivity, and io.flutter.app.FlutterFragmentActivity.


The documentation for this interface was generated from the following file: