Although I like that the space key causes the ListView to scroll down a page, I'm wondering if that behavior is important enough to be immutable. The ListView is a great general purpose widget (there are about 10 ListViews in my application). It would be nice to have access to all the entered text ... just my opinion.
Best regards, Greg On Sep 2, 1:40 pm, Romain Guy <[email protected]> wrote: > Space is used in ListView to jump from screen to screen and you cannot > change this behavior. > > > > On Wed, Sep 2, 2009 at 9:13 AM, greg<[email protected]> wrote: > > > 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); > > } > > -- > Romain Guy > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time > to provide private support. All such questions should be posted on > public forums, where I and others can see and answer them --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

