2011-09-20 3 views

답변

0

당신은 단순히 당신의 TextWatcher에 toString()를 호출 할 수 있어야한다는 :

private class GenericTextWatcher implements TextWatcher{ 
    private View view; 
    private GenericTextWatcher(View view) { 
     this.view = view; 
    } 

    public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {} 
    public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {} 

    public void afterTextChanged(Editable editable) { 
     String text = editable.toString(); 
    } 
} 

문자열이 shouldn에 언어 :
name.addTextChangedListener(new GenericTextWatcher(name));

가 리스너를 정의

리스너 설정 당신이 그것을 저장하거나 전시 할 때까지 중요하지 않습니다.

관련 문제