| | |
| | | } |
| | | }); |
| | | //输入手机号或者邮箱 |
| | | viewBinding.changeAccountEt.addTextChangedListener(new TextWatcher() { |
| | | @Override |
| | | public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onTextChanged(CharSequence s, int start, int before, int count) { |
| | | isCompleteEnabled(); |
| | | } |
| | | |
| | | @Override |
| | | public void afterTextChanged(Editable s) { |
| | | |
| | | } |
| | | }); |
| | | viewBinding.changeAccountEt.addTextChangedListener(accountTextWatcher); |
| | | //手机号获取验证码 |
| | | viewBinding.changePhoneVerificationTv.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | |
| | | } |
| | | }); |
| | | //输入手机验证码 |
| | | viewBinding.changePhoneVerificationEt.addTextChangedListener(new TextWatcher() { |
| | | @Override |
| | | public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onTextChanged(CharSequence s, int start, int before, int count) { |
| | | isCompleteEnabled(); |
| | | } |
| | | |
| | | @Override |
| | | public void afterTextChanged(Editable s) { |
| | | |
| | | } |
| | | }); |
| | | viewBinding.changePhoneVerificationEt.addTextChangedListener(phoneVerificationTextWatcher); |
| | | //邮箱获取验证码 |
| | | viewBinding.changeMailVerificationTv.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | |
| | | } |
| | | }); |
| | | //输入邮箱验证码 |
| | | viewBinding.changeMailVerificationEt.addTextChangedListener(new TextWatcher() { |
| | | @Override |
| | | public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onTextChanged(CharSequence s, int start, int before, int count) { |
| | | isCompleteEnabled(); |
| | | } |
| | | |
| | | @Override |
| | | public void afterTextChanged(Editable s) { |
| | | |
| | | } |
| | | }); |
| | | viewBinding.changeMailVerificationEt.addTextChangedListener(MailVerificationTextWatcher); |
| | | //输入密码 |
| | | viewBinding.changePswEt.addTextChangedListener(new TextWatcher() { |
| | | @Override |
| | | public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onTextChanged(CharSequence s, int start, int before, int count) { |
| | | isCompleteEnabled(); |
| | | } |
| | | |
| | | @Override |
| | | public void afterTextChanged(Editable s) { |
| | | |
| | | } |
| | | }); |
| | | viewBinding.changePswEt.addTextChangedListener(changePswTextWatcher); |
| | | //密码显示或者隐藏 |
| | | viewBinding.changePswHideIv.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | |
| | | } |
| | | }); |
| | | //输入确认密码 |
| | | viewBinding.changeConfirmPswEt.addTextChangedListener(new TextWatcher() { |
| | | @Override |
| | | public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onTextChanged(CharSequence s, int start, int before, int count) { |
| | | isCompleteEnabled(); |
| | | } |
| | | |
| | | @Override |
| | | public void afterTextChanged(Editable s) { |
| | | |
| | | } |
| | | }); |
| | | viewBinding.changeConfirmPswEt.addTextChangedListener(changeConfirmPswTextWatcher); |
| | | //确认密码显示或者隐藏 |
| | | viewBinding.changeConfirmPswHideIv.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | |
| | | mailCountDownTimer.cancel(); |
| | | mailCountDownTimer = null; |
| | | } |
| | | viewBinding.changeAccountEt.removeTextChangedListener(accountTextWatcher); |
| | | viewBinding.changePhoneVerificationEt.removeTextChangedListener(phoneVerificationTextWatcher); |
| | | viewBinding.changeMailVerificationEt.removeTextChangedListener(MailVerificationTextWatcher); |
| | | viewBinding.changePswEt.removeTextChangedListener(changePswTextWatcher); |
| | | viewBinding.changeConfirmPswEt.removeTextChangedListener(changeConfirmPswTextWatcher); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 输入手机号或者邮箱 |
| | | */ |
| | | private final TextWatcher accountTextWatcher = new TextWatcher() { |
| | | @Override |
| | | public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onTextChanged(CharSequence s, int start, int before, int count) { |
| | | isCompleteEnabled(); |
| | | } |
| | | |
| | | @Override |
| | | public void afterTextChanged(Editable s) { |
| | | |
| | | } |
| | | }; |
| | | /** |
| | | * 输入手机验证码 |
| | | */ |
| | | private final TextWatcher phoneVerificationTextWatcher = new TextWatcher() { |
| | | @Override |
| | | public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onTextChanged(CharSequence s, int start, int before, int count) { |
| | | isCompleteEnabled(); |
| | | } |
| | | |
| | | @Override |
| | | public void afterTextChanged(Editable s) { |
| | | |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 邮箱获取验证码 |
| | | */ |
| | | private final TextWatcher MailVerificationTextWatcher = new TextWatcher() { |
| | | @Override |
| | | public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onTextChanged(CharSequence s, int start, int before, int count) { |
| | | isCompleteEnabled(); |
| | | } |
| | | |
| | | @Override |
| | | public void afterTextChanged(Editable s) { |
| | | |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 输入密码 |
| | | */ |
| | | private final TextWatcher changePswTextWatcher = new TextWatcher() { |
| | | @Override |
| | | public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onTextChanged(CharSequence s, int start, int before, int count) { |
| | | isCompleteEnabled(); |
| | | } |
| | | |
| | | @Override |
| | | public void afterTextChanged(Editable s) { |
| | | |
| | | } |
| | | }; |
| | | /** |
| | | * 输入确认密码 |
| | | */ |
| | | private final TextWatcher changeConfirmPswTextWatcher = new TextWatcher() { |
| | | @Override |
| | | public void beforeTextChanged(CharSequence s, int start, int count, int after) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onTextChanged(CharSequence s, int start, int before, int count) { |
| | | isCompleteEnabled(); |
| | | } |
| | | |
| | | @Override |
| | | public void afterTextChanged(Editable s) { |
| | | |
| | | } |
| | | }; |
| | | } |