Commit 978ca55c authored by yangwu.jia's avatar yangwu.jia

解决 多个SurfaceView时候,闪屏的问题

parent 21ebee21
...@@ -585,7 +585,6 @@ public class XFlutterView extends FrameLayout { ...@@ -585,7 +585,6 @@ public class XFlutterView extends FrameLayout {
+ " to new engine."); + " to new engine.");
detachFromFlutterEngine(); detachFromFlutterEngine();
} }
this.requestFocus();
this.flutterEngine = flutterEngine; this.flutterEngine = flutterEngine;
// Instruct our FlutterRenderer that we are now its designated RenderSurface. // Instruct our FlutterRenderer that we are now its designated RenderSurface.
......
...@@ -5,6 +5,7 @@ import android.app.Activity; ...@@ -5,6 +5,7 @@ import android.app.Activity;
import android.arch.lifecycle.Lifecycle; import android.arch.lifecycle.Lifecycle;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.graphics.PixelFormat;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
...@@ -102,6 +103,8 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine ...@@ -102,6 +103,8 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
host.configureFlutterEngine(flutterEngine); host.configureFlutterEngine(flutterEngine);
host.getActivity().getWindow().setFormat(PixelFormat.TRANSLUCENT);
} }
......
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