How can I restrict EditText to take emojis
问题 I am developing an application where I want my edittext should take Name only. I have tried using android:inputType="textCapSentences" but it seems like its not working. My edittext is still taking the emojis. So, Is there any way i can restrict any special character or emojis input in edit text in android. If anyone have idea,Please reply. Thanks in advance. 回答1: you can use emoji filter as code below mEditText.setFilters(new InputFilter[]{EMOJI_FILTER}); public static InputFilter EMOJI