I am restricting on Android Edittext as below
android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" but can't enter spaces. How can I make it allow spaces? Is this possible to get only via .xml?.
I am restricting on Android Edittext as below
android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" but can't enter spaces. How can I make it allow spaces? Is this possible to get only via .xml?.
Try this, hope it helps,
android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ "
Edittext digit accept white space only if give space end of characters, have look:
android:digits="abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Happy coding!!
<string name="digits_text">abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@$%^*()_+-{},./\|& </string>
<android.support.design.widget.TextInputLayout
android:id="@+id/textinputlayout_support_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/textview_or">
<android.support.design.widget.TextInputEditText
android:id="@+id/textinputedittext_help_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="top"
android:digits="@string/digits_text"
android:hint="@string/description"
android:inputType="textMultiLine"
android:lines="6"
android:maxLines="10" />
</android.support.design.widget.TextInputLayout>
Digits allowed space in EditText Android.
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ "
<android.support.design.widget.TextInputEditText
style="@style/Text_input_EditText"
android:hint="Enter S/o , D/o , W/o *"
android:inputType="textCapCharacters"
android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ "
android:maxLength="100"
android:id="@+id/do_ad_so_do_wo"
/>