Hi guys,
I just got back from holidays :)
this is the hack

@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
        InputConnection ic = super.onCreateInputConnection(outAttrs);
        InputConnectionWrapper icw = new InputConnectionWrapper(ic, false) {

                public boolean commitText(CharSequence text, int 
newCursorPosition)
{
                        //TODO text is the new inserted text, return if the 
text is ok or
not
                }
        };
        return icw;
}

The point is, one should use InputFilter objects on a TextField as
much as possible,
but in the very special case that you have to react to the key pressed
on the vitual keyboard
to do something more custom, that's the only way I found.

Hope this helps

On Aug 6, 11:09 pm, Hong <lordh...@gmail.com> wrote:
> Hi Emanuele,
>
> I'm interested in knowing your solution as well ;)  A small favor on
> my tips to you... please...
>
> Thanks
>
> Hong
>
>
>
> On Fri, Jul 31, 2009 at 10:48 AM, Azhdar<azh...@gmail.com> wrote:
>
> > Hi Hazam,
>
> > could you show us more in detail how you do that ?
>
> > Thank you !
>
> > Azhdar
>
> > On Jul 10, 3:23 pm, Hazam <emanuele.disave...@gmail.com> wrote:
> >> Hi Hong,
> >> thanks for your reply.
> >> I tried that but to no avail.
> >> The reason seems to be that clicks and actions fromvirtualkeyboard
> >> do not follow the same
> >> path that normal key and touch events do.
> >> The get tunneled in an InputConnection, and things get REALLY
> >> difficult for me to understand fully.
> >> So i just override onCreateInputConnection and return a
> >> BaseInputConnection and now it works.
> >> thanks again for the reply,
>
> >> -Emanuele
--~--~---------~--~----~------------~-------~--~----~
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