Dianne,

Since the Squeak VM which I am porting to Android takes care of
editing text itself (by means of Morphic widgets), I just need to pass
events from every touch of soft keyboard to the View in focus. No
special handling for backspace/numbers/nothing.

The input connection I currently have (inherited from the parent
project, I haven't touched it yet) is at its current revision, here:

http://tinyurl.com/4628qth

With this implementation I have working input for letters, and some
special characters, but no input for digits and backspace.

There also is a code in the View implementation (also inherited):

public boolean onCheckIsTextEditor() {
           return true;
}

@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
   if(!onCheckIsTextEditor()) return null;
   return new SqueakInputConnection(this, false);
}

Should I just return null from onCreateInputConnection (or return
false from onCheckIsTextEditor)?

Thank you.

On Wed, Mar 30, 2011 at 12:41 PM, Dianne Hackborn <hack...@android.com> wrote:
> I don't understand what you are asking.  If you want to not let any editing
> to happen, just implement an InputConnection that doesn't do anything.  If
> there is something different than that which you are looking for...  well
> you'll just need to implement the operations on InputConnection to whatever
> it is you want.
> You say all you need is to pass a key event...  but the point of
> InputConnection is to *not* operate in key events.  If you just want raw key
> events, don't implement an InputConnection.  (There is compatibility code
> that turns operations into raw key events for apps that don't support input
> connections.)

-- 
Dimitry Golubovsky

Anywhere on the Web

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to