Ejemplo n.º 1
0
        public virtual bool onKeyOther(android.view.View view, android.text.Editable content
                                       , android.view.KeyEvent @event)
        {
            if (@event.getAction() != android.view.KeyEvent.ACTION_MULTIPLE || @event.getKeyCode
                    () != android.view.KeyEvent.KEYCODE_UNKNOWN)
            {
                // Not something we are interested in.
                return(false);
            }
            int selectionStart = android.text.Selection.getSelectionStart(content);
            int selectionEnd   = android.text.Selection.getSelectionEnd(content);

            if (selectionEnd < selectionStart)
            {
                int temp = selectionEnd;
                selectionEnd   = selectionStart;
                selectionStart = temp;
            }
            java.lang.CharSequence text = java.lang.CharSequenceProxy.Wrap(@event.getCharacters
                                                                               ());
            if (text == null)
            {
                return(false);
            }
            content.replace(selectionStart, selectionEnd, text);
            return(true);
        }