edtitextを変更するたびに、このダッシュ「-」などの文字を追加するにはどうすればよいですか。たとえば、ユーザーがAと入力すると、編集テキストのテキストはAになります。次に、ユーザーは入力して文字Bと入力すると、編集テキストはABになります。これを実装しますか?ありがとう
name = (EditText)findViewById(R.id.editText1);
name.addTextChangedListener(new TextWatcher(){
public void afterTextChanged(Editable s) {
name.setText("-");
}
public void beforeTextChanged(CharSequence s, int start, int count, int after){}
public void onTextChanged(CharSequence s, int start, int before, int count){
}