Have you tried capturing the ENTER key event and using that to trigger
your application's custom behavior?  See
http://developer.android.com/resources/tutorials/views/hello-formstuff.html
that includes the following example code:

final EditText edittext = (EditText) findViewById(R.id.edittext);
edittext.setOnKeyListener(new OnKeyListener() {
    public boolean onKey(View v, int keyCode, KeyEvent event) {
        // If the event is a key-down event on the "enter" button
        if ((event.getAction() == KeyEvent.ACTION_DOWN) &&
            (keyCode == KeyEvent.KEYCODE_ENTER)) {
          // Perform action on key press
          Toast.makeText(HelloFormStuff.this, edittext.getText(),
Toast.LENGTH_SHORT).show();
          return true;
        }
        return false;
    }
});



On Jul 20, 2:09 am, Eelco <[email protected]> wrote:
> I want to override the behaviour of the ENTER key of the virtual
> keyboard so that:
>
>     * when there are more fields on the screen, it 'tabs' to the next
> field
>     * when it is the last field of the screen, it performs the default
> action of the screen
>
> I've been playing with the IME options and labels, but just don't get
> what I want. Anybody a suggestion?

-- 
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