Friday, September 9, 2011

[android-developers] keyboard touch even is ALWAYS intercepted, even when it shouldn't be.

Hello,

I have created an alternative keyboard (MessagEase, on the market)
that does NOT use the entire lower part of the screen. It can be
configured to use only a small, squarish area on the lower left, right
or center, leaving the unused screen area visible and hopefully useful
for the user.

The trouble is that even when I return false in onTouch, Android OS
traps the touch even and does no send it to the view underneath the
keyboard, as I think it should.

@Override
public boolean onTouch(View v, MotionEvent event) {
// if event's coordinates are on the keyboard, then process this
input
if (locatedOnKeyboard(event)){
processInput(event);
return true;
}
// else it's not on the keyboard: do nothing
else{
return false;
}
}

But no matter, the unused event never gets passed down to the views
underneath.

Is this a bug? Feature?
What can I do to remedy this or work around this?

This ability is crucial, since especially on tablets, my keyboard only
occupies a relatively small screen area. touching the vast area not
used by the keyboard would increase the functionality of the Android
tablets so much more.

Thanks for your thoughts and insights.

Best,

Saied

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment