EditText의 setFocusable을 text의 값이 변경될 때 적용합니다.


EditText edit_a = (EditText)findViewById(R.id.edit_a);

EditText edit_b = (EditText)findViewById(R.id.edit_b);

EditText edit_c = (EditText)findViewById(R.id.edit_c);


edit_a.addTextChangedListener(mOnWatcherAListener);

edit_b.addTextChangedListener(mOnWatcherBListener);

edit_c.addTextChangedListener(mOnWatcherCListener);


TextWatcher mOnWatcherAListener = new TextWatcher(){

....

public void onTextChanged(CharSequence s, int start, int before, int count) {

edit_a.setFocusable(false);

edit_b.setFocusable(true);

}

....

}


TextWatcher mOnWatcherBListener = new TextWatcher(){

....

public void onTextChanged(CharSequence s, int start, int before, int count) {

edit_b.setFocusable(false);

edit_c.setFocusable(true);

}

....

}


TextWatcher mOnWatcherCListener = new TextWatcher(){

....

public void onTextChanged(CharSequence s, int start, int before, int count) {

edit_c.setFocusable(false);

if(!isValid()){

edit_a.setFocusable(true); <- 이부분이 적용이 되지 않습니다.

}

}

....

}


setFocusable이 처음엔 적용이 되는 데 false한 걸 다시 true로 변경하면 적용이 되지 않습니다.

어떻게 해야하는 지 아시는 분 답변 부탁합니다.