In the ListView, the space key is available as an onKeyUp event but
not as an onKeyDown event.  Is it possible to override the ListView's
default response (i.e., page down) to the space key?

The reason I ask is that my application's ListView scrolls to the text
(including space characters) the user enters.  Although I can
implement my application's ListView scrolling based upon characters
from onKeyUp(), that results in unwanted list jumping anytime the user
types a space.

Best regards,
Greg

P.S., To verify this onKeyUp and onKeyDown behavior, copy the
following into the List14 API Demo:

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
   char c = (char)event.getUnicodeChar();
   Toast.makeText(this, "down '" + c + "'", Toast.LENGTH_SHORT).show
();
   return super.onKeyDown(keyCode, event);
}

@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
   char c = (char)event.getUnicodeChar();
   Toast.makeText(this, "up '" + c + "'", Toast.LENGTH_SHORT).show();
   return super.onKeyUp(keyCode, event);
}

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

Reply via email to