| | |
| | | |
| | | import android.content.Intent; |
| | | import android.graphics.Color; |
| | | import android.os.Build; |
| | | import android.os.Bundle; |
| | | import android.text.Editable; |
| | | import android.text.SpannableStringBuilder; |
| | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | setStatusBarTranslucent(); |
| | | getWindow().setNavigationBarColor(getColor(R.color.text_00000000)); |
| | | //初始化 |
| | | initView(); |
| | | //初始化界面监听器 |
| | |
| | | return; |
| | | } |
| | | //符合密码规则后隐藏错误提示; |
| | | viewBinding.homeLoginLine2V.setBackgroundColor(getColor(R.color.text_FF5A5A5A)); |
| | | // viewBinding.homeLoginLine2V.setBackgroundColor(getColor(R.color.text_FF5A5A5A)); |
| | | viewBinding.homeLoginPasswordTextErrorTv.setText(""); |
| | | |
| | | } |
| | |
| | | */ |
| | | private boolean isLocalCheckAccountAndPassword(String account, String password) { |
| | | if (TextUtils.isEmpty(account)) { |
| | | viewBinding.homeLoginLine1V.setBackgroundColor(getColor(R.color.text_D34545)); |
| | | // viewBinding.homeLoginLine1V.setBackgroundColor(getColor(R.color.text_D34545)); |
| | | viewBinding.homeLoginAccountTextErrorTv.setText(R.string.home_login_error_account_null); |
| | | return false; |
| | | } |
| | | if (TextUtils.isEmpty(password)) { |
| | | viewBinding.homeLoginLine2V.setBackgroundColor(getColor(R.color.text_D34545)); |
| | | // viewBinding.homeLoginLine2V.setBackgroundColor(getColor(R.color.text_D34545)); |
| | | viewBinding.homeLoginPasswordTextErrorTv.setText(R.string.home_login_error_password_null); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | if (password.length() < 6 || password.length() > 16) { |
| | | viewBinding.homeLoginLine2V.setBackgroundColor(getColor(R.color.text_D34545)); |
| | | // viewBinding.homeLoginLine2V.setBackgroundColor(getColor(R.color.text_D34545)); |
| | | viewBinding.homeLoginPasswordTextErrorTv.setText(R.string.home_login_error_6_16_str); |
| | | return false; |
| | | } |
| | |
| | | HdlThreadLogic.runMainThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | viewBinding.homeLoginLine1V.setBackgroundColor(getColor(R.color.text_E1E1E1)); |
| | | // viewBinding.homeLoginLine1V.setBackgroundColor(getColor(R.color.text_E1E1E1)); |
| | | viewBinding.homeLoginAccountTextErrorTv.setText(""); |
| | | viewBinding.homeLoginLine2V.setBackgroundColor(getColor(R.color.text_E1E1E1)); |
| | | // viewBinding.homeLoginLine2V.setBackgroundColor(getColor(R.color.text_E1E1E1)); |
| | | viewBinding.homeLoginPasswordTextErrorTv.setText(""); |
| | | } |
| | | }, null, null); |