Commit 92acb2e3 authored by lipeng54's avatar lipeng54

解决Android PlatformView在前后台切换的时候消失不见的问题

parent 570f4acb
......@@ -221,6 +221,7 @@ public class BoostFlutterView extends FrameLayout {
super.onDetachedFromWindow();
getViewTreeObserver().removeOnGlobalLayoutListener(mGlobalLayoutListener);
onDetach();
flutterEngine.getPluginRegistry().getPlatformViewsController().onFlutterViewDestroyed();
}
public BoostFlutterEngine getEngine(){
......
......@@ -534,7 +534,6 @@ public class XFlutterView extends FrameLayout {
// detach platformviews in page in case memory leak
flutterEngine.getPluginRegistry().getPlatformViewsController().detach();
flutterEngine.getPluginRegistry().getPlatformViewsController().onFlutterViewDestroyed();
// Inform the Android framework that it should retrieve a new InputConnection
// now that the engine is detached. The new InputConnection will be null, which
......
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