flutter_boost icon indicating copy to clipboard operation
flutter_boost copied to clipboard

PlatformView切换前后台消失不见

Open TryLoveCatch opened this issue 7 years ago • 2 comments

版本:flutter_boost-0.1.54 系统:Android 背景:在使用PlatformView的时候,Activity切换到后台(或者关闭屏幕),再切回来,PlatformView会消失不见 测试:在官方example使用TextPlatformViewPlugin进行测试,TextView会消失,问题依然存在 分析:目前分析来看,在BoosterFlutterActivity#onPause(),会调用ContainerRecord#onDisappear(),里面调用了Container.getBoostFlutterView().onDetach(),会调用到XFlutterView#detachFromFlutterEngine(),执行完this.flutterEngine.getPluginRegistry().getPlatformViewsController().onFlutterViewDestroyed(),就会出现该问题 解决:注释掉this.flutterEngine.getPluginRegistry().getPlatformViewsController().onFlutterViewDestroyed(),可以临时解决这个问题,但不清楚是否有其他问题。

TryLoveCatch avatar Oct 29 '19 04:10 TryLoveCatch

切到最新版就没有这个问题了

jaysonss avatar Oct 31 '19 10:10 jaysonss

切到最新版就没有这个问题了

是的,在新版本中修复了

noborder avatar Dec 27 '19 09:12 noborder