I have two TextInputLayout elements: first and last name. At the bottom, I have another TextInputLayout width element: email.
I am trying to overwrite the next button on the keyboard so that when I click Next inside the firstname input, it should go on to enter the name and from there to email, etc.
Now the problem is that when I click Next on the keyboard, it does not go to the lastname field, but instead is sent to the e-mail below.
This is the part of my xml file where I have three inputs:
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_gravity="center_horizontal" android:baselineAligned="false"> <android.support.design.widget.TextInputLayout android:id="@+id/input_layout_firstname" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1"> <EditText android:id="@+id/register_input_firstname" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/hint_firstname" android:inputType="textCapSentences" android:nextFocusForward="@+id/register_input_lastname" android:nextFocusRight="@+id/register_input_lastname" /> </android.support.design.widget.TextInputLayout> <android.support.design.widget.TextInputLayout android:id="@+id/input_layout_lastname" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1"> <EditText android:id="@+id/register_input_lastname" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/hint_lastname" android:inputType="textCapSentences" android:nextFocusDown="@+id/register_input_email" /> </android.support.design.widget.TextInputLayout> </LinearLayout> <android.support.design.widget.TextInputLayout android:id="@+id/input_layout_email" android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/register_input_email" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/hint_email" android:inputType="textEmailAddress" /> </android.support.design.widget.TextInputLayout>
I also tried TextInputLayout instead of EditText , but it has no effect.
Is the next trick even possible with TextInputLayout , or is it a mistake, or am I just doing something very wrong?
source share