TextWatcher是一个监听字符变化的类。当我们调用EditText的addTextChangedListener(TextWatcher)方法之后,就可以监听EditText的输入了。在new出一个TextWatcher之后,我们需要实现三个抽象方法:beforeTextChangedonTextChangedafterTextChanged看下beforeTextChanged的注释:Thismethodiscalledtonotifyyouthat,withins,thecountcharactersbeginningatstartareabouttobereplacedbynewtextwi...
继续阅读 >