试试这样的东西,这对我有用
editText.setFilters(new InputFilter[]{new EmojiExcludeFilter()}); private class EmojiExcludeFilter implements InputFilter { @Override public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { for (int i = start; i