File tree 1 file changed +13
-0
lines changed
aceeditor/src/main/java/com/susmit/aceeditor
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 11
11
import android .view .LayoutInflater ;
12
12
import android .view .MotionEvent ;
13
13
import android .view .View ;
14
+ import android .view .inputmethod .BaseInputConnection ;
15
+ import android .view .inputmethod .EditorInfo ;
16
+ import android .view .inputmethod .InputConnection ;
14
17
import android .webkit .JsResult ;
15
18
import android .webkit .WebChromeClient ;
16
19
import android .webkit .WebView ;
@@ -70,6 +73,16 @@ public AceEditor(Context context, AttributeSet attrs)
70
73
initialize ();
71
74
}
72
75
76
+ @ Override
77
+ public InputConnection onCreateInputConnection (EditorInfo outAttrs ) {
78
+ return new BaseInputConnection (this , false ); //this is needed for #dispatchKeyEvent() to be notified.
79
+ }
80
+
81
+ @ Override
82
+ public boolean dispatchKeyEvent (KeyEvent event ) {
83
+ return super .dispatchKeyEvent (event );
84
+
85
+ }
73
86
@ SuppressLint ("SetJavaScriptEnabled" )
74
87
private void initialize ()
75
88
{
You can’t perform that action at this time.
0 commit comments