EditText 与TextView 实现 输入同步
随着?EditText的输入更新TextView 的内容? 呵呵? 挺有意思
关键点就是EditText 实现TextWatcher这个接口?
?
?
et_input.addTextChangedListener(new TextWatcher(){@Overridepublic void afterTextChanged(Editable s) {// TODO Auto-generated method stub}@Overridepublic void beforeTextChanged(CharSequence s, int start, int count,int after) {// TODO Auto-generated method stub}@Overridepublic void onTextChanged(CharSequence s, int start, int before,int count) {tv_syn.setText(et_input.getText());}});
?
?