0

I want to input EditText som characters: android:digits="1234567890-_@#." If I don't set inputType keyboard input Text is default.

I want show number keyboard show default. But:

If in EditText design ,i set:

 android:inputType="number"

or

android:inputType="phone"

EditText don't show key (@,_) How show default keyboard number (allow input digits="1234567890-_@#.") in Edittext?

mum
  • 1,637
  • 11
  • 34
  • 58

1 Answers1

2

Use this :

       <EditText
            android:id="@+id/ed1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="" 
            android:inputType="number"
            android:digits="1234567890-_@#."/>

It works for me and allow me to insert this characters "1234567890-_@#." only.

Hope this will help you.

Thanks.

Pratik Sharma
  • 13,307
  • 5
  • 27
  • 37