android:imeOptions=";“下一步行动”;不起作用

android:imeOptions=";“下一步行动”;不起作用,android,android-layout,textinput,imeoptions,Android,Android Layout,Textinput,Imeoptions,我正在创建注册页面,但在每个文本输入文本中都添加了“下一步”按钮,它工作得很好,没有任何问题 但每当我在布局中添加android:digits=“0123456789qwertzuiopasdfghjklyxcvbnm”时,它就不起作用了 解决这个问题的可能原因是什么 下面是我的代码片段 <com.google.android.material.textfield.TextInputLayout android:layout_width="0dp

我正在创建注册页面,但在每个文本输入文本中都添加了“下一步”按钮,它工作得很好,没有任何问题

但每当我在布局中添加android:digits=“0123456789qwertzuiopasdfghjklyxcvbnm”时,它就不起作用了

解决这个问题的可能原因是什么

下面是我的代码片段

  <com.google.android.material.textfield.TextInputLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:textColorHint="#c0c0c0"
                    app:errorEnabled="true"
                    app:theme="@style/MyTextInputLayoutStyle">
                    <com.google.android.material.textfield.TextInputEditText
                        android:id="@+id/activity_register_edit_text_state"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:ems="10"
                        android:hint="@string/state_region"
                        android:imeOptions="actionNext"
                       android:digits="0123456789qwertzuiopasdfghjklyxcvbnm_ "            
           android:inputType="textPersonName"
                         android:padding="@dimen/edittext_padding"
                        android:textColor="@color/text_color_light"
                        android:theme="@style/MyTextInputLayoutStyle"
                        app:errorTextAppearance="@style/TextErrorAppearance"
                        app:xfont="@string/roboto_regular" />
                </com.google.android.material.textfield.TextInputLayout>


提前感谢。

当您在EditText或ExtInputText中设置android:digits时,它只允许您在其中定义的数字或字符。在android软输入(键盘)中,下一步按钮具有android中未定义的唯一代码:数字


参考此内容以更好地理解

您还需要在您的
textinputtext
中添加
android:inputType=“text”
,我已经尝试过了,即使有疑问,我也添加了android:inputTypeTest案例只需更改
app:theme=“@style/MyTextInputLayoutStyle”
with
style=“@style/MyTextInputLayoutStyle”
尝试过,但没有运气将android:maxLines=“1”与android:inputType=“text”一起添加