1

I have encountered a strange behaviour of android:imeOptions="actionNext". When I press next on the keyboard it actually navigates out of the AutoCompleteEditText but doesn't focus on the next one. I am using the same setting for my other EditTexts and it works fine.

Here is the .xml code:

<AutoCompleteTextView
    android:id="@+id/email"
    android:layout_width="match_parent"
    android:layout_height="@dimen/login_form_height"
    android:hint="@string/prompt_email_username"
    android:imeOptions="actionNext"
    android:inputType="textEmailAddress"
    android:maxLines="1"
    android:padding="@dimen/login_form_padding" />

<EditText
    android:id="@+id/password"
    android:layout_width="match_parent"
    android:layout_height="@dimen/login_form_height"
    android:hint="@string/prompt_password"
    android:imeActionId="6"
    android:imeActionLabel="@string/action_sign_in_short"
    android:imeOptions="actionUnspecified"
    android:inputType="textPassword"
    android:maxLines="1"
    android:padding="@dimen/login_form_padding" />

So when I press next it leaves "@+id/email" but doesn't focus on "@+id/password". Any ideas?

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
Petr Ungar
  • 21
  • 3

1 Answers1

1

android:singleLine="true" or android:inputType="text" can solve your problem

<AutoCompleteTextView
    android:id="@+id/email"
    android:layout_width="match_parent"
    android:layout_height="@dimen/login_form_height"
    android:hint="@string/prompt_email_username"
    android:singleLine="true"
    android:inputType="text"
    android:imeOptions="actionNext"
    android:maxLines="1"
    android:padding="@dimen/login_form_padding" />
Jitesh Prajapati
  • 2,533
  • 4
  • 29
  • 51
  • 1
    Doesn't work. The thing is I use the same .xml code for other views and it works just fine. Could it be an issue with AutoCompleteTextView? – Petr Ungar Feb 28 '19 at 09:42