如果更改edittext的内容,如何获取edittext值并将其存储在textview上?
答案 0 :(得分:1)
NumofRevs_et.addTextChangedListener(new TextWatcher() {
public void afterTextChanged(Editable s) {}
public void beforeTextChanged(CharSequence s, int start, int count,int after) {
//XXX do something
}
public void onTextChanged(CharSequence s, int start, int before, int count)
{
title_text.setText(s); // set the Text View Value using the edit text value
}
});
答案 1 :(得分:0)
EditText上的setTextWatcher .....然后根据需要覆盖onTextChanged,beforeTextChanged,afterTextChanged