angeo
answered Sep 15 '21 00:00
at xml you can apply
android:inputType="phone"
and
android:digits="0123456789"
android:inputType="number" or android:inputType="phone" will allow to show the numberic input box
android:digits="0123456789" allow only digit number , no space , no other character
<EditText
android:id="@+id/phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/_10sdp"
android:layout_marginRight="@dimen/_10sdp"
android:layout_marginTop="@dimen/_15sdp"
android:hint="Enter Phone no"
android:digits="0123456789"
android:inputType="number"
android:imeOptions="actionNext"
android:maxLines="1" />