今日需求,EditText内容为一串字符串,要求将用户软键盘输入的小写字母在输入的时候自动转为大写字母,反之亦然。
效果如下:
?..., 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y',...protected char[] getReplacement() {
char[] replacementCharArr = { 'A', 'B', 'C',...'D', 'E', 'F', 'G', 'H', 'I', 'J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' };...两个字符数组,分别将对应位置的原始字符转换为要求后的字符。