Commit 03794085 authored by 龚文硕's avatar 龚文硕

新的注册方式在onAttach时执行attachToView

parent ca265ff1
......@@ -606,6 +606,7 @@ public class XFlutterView extends FrameLayout {
isFlutterUiDisplayed = flutterRenderer.isDisplayingFlutterUi();
renderSurface.attachToRenderer(flutterRenderer);
flutterRenderer.addIsDisplayingFlutterUiListener(flutterUiDisplayListener);
this.flutterEngine.getPlatformViewsController().attachToView(this);
......@@ -691,7 +692,7 @@ public class XFlutterView extends FrameLayout {
// Disconnect the FlutterEngine's PlatformViewsController from the AccessibilityBridge.
flutterEngine.getPlatformViewsController().detachAccessibiltyBridge();
flutterEngine.getPlatformViewsController().detachFromView();
// Disconnect and clean up the AccessibilityBridge.
accessibilityBridge.release();
accessibilityBridge = null;
......
......@@ -182,7 +182,7 @@ public class FlutterSplashView extends FrameLayout {
public void onAttach() {
Debuger.log("BoostFlutterView onAttach");
mFlutterEngine.getPlatformViewsController().attachToView(flutterView);
flutterView.attachToFlutterEngine(mFlutterEngine);
}
......@@ -190,7 +190,7 @@ public class FlutterSplashView extends FrameLayout {
public void onDetach() {
Debuger.log("BoostFlutterView onDetach");
mFlutterEngine.getPlatformViewsController().detachFromView();
flutterView.detachFromFlutterEngine();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment