private void setTextViewWatcher(){
tv.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
if(editable.length()>0){
//编辑框长度>0
}else{
//编辑框长度为0
}
}
});
}
EditView-设置监听
最新推荐文章于 2022-04-07 11:27:25 发布