我有两个 Edittext,当第一个 Edittext 更改时,为第二个 Edittext 设置文本输出。当第二个 Edittext 改变时,设置第一个 Edittext 的文本输出。我该如何设置它们?
谢谢
inputValue = (EditText) findViewById(R.id.EditTextValue);
ResultView = (EditText) findViewById(R.id.TextViewResult);
inputValue.addTextChangedListener(textWatcher);
ResultView.addTextChangedListener(textWatcher);
public TextWatcher textWatcher = new TextWatcher() {
private View view;
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
}
public void onTextChanged(CharSequence s, int start, int before,
int count) {
}
public void afterTextChanged(Editable arg0) {
}
}
};