Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0af02581 authored by Katherine Kuan's avatar Katherine Kuan
Browse files

Fix keyboard navigation between editable text fields

In the contact editor, currently keyboard navigation
between editable text fields is broken. By setting
the IME options flag, the "next" button will be
offered in the IME when the user is in an editable
text field.

Bug: 5599728
Change-Id: I5eb74455148c1f58f9fba8ece2c5089d9fdc6bf3
parent c5dd3dcc
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
@@ -196,6 +197,11 @@ public class TextFieldsEditorView extends LabeledEditorView {
                PhoneNumberFormatter.setPhoneNumberFormattingTextWatcher(mContext, fieldView);
            }

            // Show the "next" button in IME to navigate between text fields
            // TODO: Still need to properly navigate to/from sections without text fields,
            // See Bug: 5713510
            fieldView.setImeOptions(EditorInfo.IME_ACTION_NEXT);

            // Read current value from state
            final String column = field.column;
            final String value = entry.getAsString(column);