真的有理解TextWatcher?

2017-03-15  本文已影响150人  Yanqilong

TextWatcher是Android文本改变监听接口,内部有以下几个函数:

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 s);

先了解调用顺序:beforeTextChanged->onTextChanged->afterTextChanged

参数解析

beforeTextChanged
onTextChanged
afterTextChanged

s 修改后的内容

同学们,理解了么,没理解提问题吧

上一篇 下一篇

猜你喜欢

热点阅读