Beispiel #1
0
            public override IInputConnection OnCreateInputConnection(EditorInfo editorInfo)
            {
                var ic = base.OnCreateInputConnection(editorInfo);

                EditorInfoCompat.SetContentMimeTypes(editorInfo, MimeTypes);
                var callback = new OnCommitContentListenerImpl()
                {
                    MimeTypes = MimeTypes, Owner = Owner
                };

                return(InputConnectionCompat.CreateWrapper(ic, editorInfo, callback));
            }
Beispiel #2
0
        public override IInputConnection OnCreateInputConnection(EditorInfo outAttrs)
        {
            var ic = base.OnCreateInputConnection(outAttrs);

            outAttrs.ImeOptions = outAttrs.ImeOptions | Android.Views.InputMethods.ImeFlags.NoPersonalizedLearning;

            if (ic != null)
            {
                // allow image insertion
                EditorInfoCompat.SetContentMimeTypes(outAttrs, new string[] { "image/gif" });

                ic = InputConnectionCompat.CreateWrapper(ic, outAttrs, this);
            }

            return(ic);
        }