Commit 42586f71 authored by justin's avatar justin Committed by GitHub

Merge pull request #445 from TryLoveCatch/0.1.54

解决Android PlatformView在前后台切换的时候消失不见的问题
parents aa8d47d6 92acb2e3
...@@ -221,6 +221,7 @@ public class BoostFlutterView extends FrameLayout { ...@@ -221,6 +221,7 @@ public class BoostFlutterView extends FrameLayout {
super.onDetachedFromWindow(); super.onDetachedFromWindow();
getViewTreeObserver().removeOnGlobalLayoutListener(mGlobalLayoutListener); getViewTreeObserver().removeOnGlobalLayoutListener(mGlobalLayoutListener);
onDetach(); onDetach();
flutterEngine.getPluginRegistry().getPlatformViewsController().onFlutterViewDestroyed();
} }
public BoostFlutterEngine getEngine(){ public BoostFlutterEngine getEngine(){
......
...@@ -534,7 +534,6 @@ public class XFlutterView extends FrameLayout { ...@@ -534,7 +534,6 @@ public class XFlutterView extends FrameLayout {
// detach platformviews in page in case memory leak // detach platformviews in page in case memory leak
flutterEngine.getPluginRegistry().getPlatformViewsController().detach(); flutterEngine.getPluginRegistry().getPlatformViewsController().detach();
flutterEngine.getPluginRegistry().getPlatformViewsController().onFlutterViewDestroyed();
// Inform the Android framework that it should retrieve a new InputConnection // Inform the Android framework that it should retrieve a new InputConnection
// now that the engine is detached. The new InputConnection will be null, which // 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