onCreate

savedInstanceState

);

// Inflate a layout that has a container for your FlutterFragment.

// For this example, assume that a FrameLayout exists with an ID of

// R.id.fragment_container.

setContentView

layout

my_activity_layout

);

// Get a reference to the Activity's FragmentManager to add a new

// FlutterFragment, or find an existing one.

FragmentManager

fragmentManager

getSupportFragmentManager

();

// Attempt to find an existing FlutterFragment,

// in case this is not the first time that onCreate() was run.

flutterFragment

FlutterFragment

fragmentManager

findFragmentByTag

TAG_FLUTTER_FRAGMENT