I am developing an application for keyboard, but i am geting an issue. I want to restrict/block some special character from soft keyboard in EditText in android programmatic
First need to add DigitsKeyListener for allowing characters and then setRawInputType to edittext field
edit_field.setKeyListener(DigitsKeyListener.getInstance("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz")); edit_field.setRawInputType(InputType.TYPE_TEXT_VARIATION_PERSON_NAME);