AutoCompleteTextView不允许输入数字

时间:2014-08-27 11:23:03

标签: android autocompletetextview

我试图在AutoCompleteTextView中输入数字,但没有任何反应。我可以使用虚拟键盘编写除[0-9]之外的所有其他符号。请帮帮我。

        <AutoCompleteTextView
        android:id="@+id/group_edittext_field"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:hint="@string/group"
        android:inputType="textCapCharacters"
        android:singleLine="true"
        android:maxLength="5"
        android:imeOptions="actionDone"
        android:textCursorDrawable="@null"
        android:textColor="@android:color/white"
        android:background="@drawable/apptheme_textfield_activated_holo_light"
        android:layout_marginTop="20dp"/>

1 个答案:

答案 0 :(得分:0)

我尝试了相同的代码并且工作得很好,但如果它不适用于您的情况,那么您只需删除android:inputType="textCapCharacters"。我确信它会接受所有角色。

相关问题