Commit 368ae69d authored by yangwu.jia's avatar yangwu.jia

Boost 1.9升级,TextField键盘呼出问题解决

parent c7fe899c
...@@ -19,6 +19,7 @@ import java.util.Map; ...@@ -19,6 +19,7 @@ import java.util.Map;
import com.idlefish.flutterboost.NewFlutterBoost; import com.idlefish.flutterboost.NewFlutterBoost;
import com.idlefish.flutterboost.XFlutterView;
import com.idlefish.flutterboost.interfaces.IFlutterViewContainer; import com.idlefish.flutterboost.interfaces.IFlutterViewContainer;
import com.idlefish.flutterboost.interfaces.IOperateSyncer; import com.idlefish.flutterboost.interfaces.IOperateSyncer;
import io.flutter.Log; import io.flutter.Log;
...@@ -44,7 +45,7 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine ...@@ -44,7 +45,7 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
@Nullable @Nullable
private FlutterSplashView flutterSplashView; private FlutterSplashView flutterSplashView;
@Nullable @Nullable
private FlutterView flutterView; private XFlutterView flutterView;
@Nullable @Nullable
private PlatformPlugin platformPlugin; private PlatformPlugin platformPlugin;
...@@ -167,7 +168,7 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine ...@@ -167,7 +168,7 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
mSyncer = NewFlutterBoost.instance().containerManager().generateSyncer(this); mSyncer = NewFlutterBoost.instance().containerManager().generateSyncer(this);
ensureAlive(); ensureAlive();
flutterView = new FlutterView(host.getActivity(), NewFlutterBoost.instance().platform().renderMode(), host.getTransparencyMode()); flutterView = new XFlutterView(host.getActivity(), NewFlutterBoost.instance().platform().renderMode(), host.getTransparencyMode());
flutterView.addOnFirstFrameRenderedListener(onFirstFrameRenderedListener); flutterView.addOnFirstFrameRenderedListener(onFirstFrameRenderedListener);
...@@ -229,6 +230,7 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine ...@@ -229,6 +230,7 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
Log.v(TAG, "onPause()"); Log.v(TAG, "onPause()");
ensureAlive(); ensureAlive();
mSyncer.onDisappear();
flutterEngine.getLifecycleChannel().appIsInactive(); flutterEngine.getLifecycleChannel().appIsInactive();
} }
...@@ -236,8 +238,6 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine ...@@ -236,8 +238,6 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
void onStop() { void onStop() {
Log.v(TAG, "onStop()"); Log.v(TAG, "onStop()");
ensureAlive(); ensureAlive();
mSyncer.onDisappear();
flutterEngine.getLifecycleChannel().appIsPaused();
// flutterView.detachFromFlutterEngine(); // flutterView.detachFromFlutterEngine();
} }
......
...@@ -28,7 +28,7 @@ public class FlutterSplashView extends FrameLayout { ...@@ -28,7 +28,7 @@ public class FlutterSplashView extends FrameLayout {
@Nullable @Nullable
private SplashScreen splashScreen; private SplashScreen splashScreen;
@Nullable @Nullable
private FlutterView flutterView; private XFlutterView flutterView;
@Nullable @Nullable
private View splashScreenView; private View splashScreenView;
@Nullable @Nullable
...@@ -112,7 +112,7 @@ public class FlutterSplashView extends FrameLayout { ...@@ -112,7 +112,7 @@ public class FlutterSplashView extends FrameLayout {
* If no {@code splashScreen} is provided, this {@code FlutterSplashView} displays the * If no {@code splashScreen} is provided, this {@code FlutterSplashView} displays the
* given {@code flutterView} on its own. * given {@code flutterView} on its own.
*/ */
public void displayFlutterViewWithSplash(@NonNull FlutterView flutterView, @Nullable SplashScreen splashScreen) { public void displayFlutterViewWithSplash(@NonNull XFlutterView flutterView, @Nullable SplashScreen splashScreen) {
// If we were displaying a previous FlutterView, remove it. // If we were displaying a previous FlutterView, remove it.
if (this.flutterView != null) { if (this.flutterView != null) {
this.flutterView.removeOnFirstFrameRenderedListener(onFirstFrameRenderedListener); this.flutterView.removeOnFirstFrameRenderedListener(onFirstFrameRenderedListener);
......
...@@ -35,7 +35,7 @@ class _MyAppState extends State<MyApp> { ...@@ -35,7 +35,7 @@ class _MyAppState extends State<MyApp> {
return MaterialApp( return MaterialApp(
title: 'Flutter Boost example', title: 'Flutter Boost example',
builder: FlutterBoost.init(postPush: _onRoutePushed), builder: FlutterBoost.init(postPush: _onRoutePushed),
home: FlutterRouteWidget()); home: Container());
} }
void _onRoutePushed( void _onRoutePushed(
......
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