Commit f78fb4b9 authored by yangwu.jia's avatar yangwu.jia

fix Input box bug

parent 3f2ae0d6
...@@ -54,6 +54,7 @@ public class BoostFlutterView extends FrameLayout { ...@@ -54,6 +54,7 @@ public class BoostFlutterView extends FrameLayout {
private BoostFlutterEngine mFlutterEngine; private BoostFlutterEngine mFlutterEngine;
private XFlutterView mFlutterView; private XFlutterView mFlutterView;
private PlatformPlugin mPlatformPlugin;
private Bundle mArguments; private Bundle mArguments;
...@@ -113,6 +114,7 @@ public class BoostFlutterView extends FrameLayout { ...@@ -113,6 +114,7 @@ public class BoostFlutterView extends FrameLayout {
if (mArguments == null) { if (mArguments == null) {
mArguments = new Bundle(); mArguments = new Bundle();
} }
mPlatformPlugin = new PlatformPlugin((Activity) getContext(), mFlutterEngine.getPlatformChannel());
mFlutterView = new XFlutterView(getContext(), getRenderMode(), getTransparencyMode()); mFlutterView = new XFlutterView(getContext(), getRenderMode(), getTransparencyMode());
addView(mFlutterView, new FrameLayout.LayoutParams( addView(mFlutterView, new FrameLayout.LayoutParams(
......
...@@ -450,16 +450,15 @@ public class XFlutterView extends FrameLayout { ...@@ -450,16 +450,15 @@ public class XFlutterView extends FrameLayout {
// Initialize various components that know how to process Android View I/O // Initialize various components that know how to process Android View I/O
// in a way that Flutter understands. // in a way that Flutter understands.
if(textInputPlugin==null){
textInputPlugin = new XTextInputPlugin( textInputPlugin = new XTextInputPlugin(
this, this,
this.flutterEngine.getDartExecutor() this.flutterEngine.getDartExecutor()
); );
androidKeyProcessor = new XAndroidKeyProcessor( androidKeyProcessor = new XAndroidKeyProcessor(
this.flutterEngine.getKeyEventChannel(), this.flutterEngine.getKeyEventChannel(),
textInputPlugin textInputPlugin
); );
}
......
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