ユーザーが入力していない場合、どうすればA
出力されませんか? でこれをやりたいですEditText
。
コード:
InputFilter filter = new InputFilter() {
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
for (int i = start; i < end; i++) {
if (!Character.toString(source.charAt(i)).equals("a")) {
return "";
}
}
return null;
}
};