Android "Next" soft keyboard button

1,894 views
Skip to first unread message

Adam Biggs

unread,
May 5, 2011, 4:37:04 PM5/5/11
to phonegap
Anybody know how to hijack this soft button? I'm finding there are
device specific problems with this button (on the Moto Droid it does
nothing, on the Samsung Galaxy S it only works sometimes).

I already have some Java code to hijack the physical back button:

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) { // go back home
//super.loadUrl("file:///android_asset/www/index.html");
return false;
}
return super.onKeyDown(keyCode, event);
}

Would it be something similar for the Next button or does this method
only apply to physical buttons?

If there was a way to completely disable the Next button and make sure
it is always the "Go" button instead (enter key) that would be ideal.

Thanks.

Simon MacDonald

unread,
May 5, 2011, 4:54:08 PM5/5/11
to phon...@googlegroups.com
Not too sure about the soft next button but you don't need to go
through that trouble with the Back button.

http://simonmacdonald.blogspot.com/2011/05/overriding-back-button-in-phonegap.html

Simon Mac Donald
http://hi.im/simonmacdonald

> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com
>

Adam Biggs

unread,
May 5, 2011, 7:59:17 PM5/5/11
to phonegap
Thanks Simon,

I tried that method with 0.9.4 and couldn't get it to work... Maybe I
should give it another shot now that 0.9.5 is out?

Cheers

On May 5, 1:54 pm, Simon MacDonald <simon.macdon...@gmail.com> wrote:
> Not too sure about the soft next button but you don't need to go
> through that trouble with the Back button.
>
> http://simonmacdonald.blogspot.com/2011/05/overriding-back-button-in-...
>
> Simon Mac Donaldhttp://hi.im/simonmacdonald
Reply all
Reply to author
Forward
0 new messages