1.布局文件
<EditText
android:id="@+id/et_add_num_one"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/et_line"
android:singleLine="true"
android:maxLines="1"
android:gravity="center"
android:digits="0123456789abcdefghijklmnopqrstuvwxyz"
android:imeOptions="actionNext"
android:lines="1"
android:maxLength="4"
android:text=""
android:textSize="11dp"
/>
2.java 代码实现
holder.etAddNumTwo.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
if (id == EditorInfo.IME_ACTION_NEXT) {
holder.etAddNumThree.requestFocus();
return true;
}
return false;
}
});