下面这个方法删除字符时就会有问题,键盘会直接卡死,求解决办法,最好是测试过的
CharSequence d = "\n";
int totalLength = s.length();
int lineNum = SINGLE_LINE_LENGTH + 1;
if (totalLength < 25) {
if ((totalLength + 1) % lineNum == 0) {
mEditText.append(d);
}
}
在xml中得EditText中设置下面属性