| | |
| | | HdlAccountLogic.getInstance().regionByAccount(account, new CloudCallBeak<HDLUserRegionBean>() { |
| | | @Override |
| | | public void onSuccess(HDLUserRegionBean obj) { |
| | | // //开发环境 |
| | | //开发环境 |
| | | // String APP_REGIONURL_TEST = "http://47.114.131.143:27197"; |
| | | // AppConfigManage.setUserRegionUrl(APP_REGIONURL_TEST); |
| | | //初始化服务域名 |
| | |
| | | String account = viewBinding.homeLoginAccountEt.getText().toString().replace(" ", ""); |
| | | String password = viewBinding.homeLoginPasswordEt.getText().toString().replace(" ", ""); |
| | | boolean isEnabled = account.length() > 0 && password.length() > 0; |
| | | if (isEnabled) { |
| | | viewBinding.homeLoginTv.setTextColor(getColor(R.color.text_E6FFFFFF)); |
| | | } else { |
| | | viewBinding.homeLoginTv.setTextColor(getColor(R.color.text_66FFFFFF)); |
| | | } |
| | | viewBinding.homeLoginTv.setEnabled(isEnabled); |
| | | if (password.length() < 6 || password.length() > 16) { |
| | | return; |
| | | } |
| | | //符合密码规则后隐藏错误提示; |
| | | viewBinding.homeLoginLine2V.setBackgroundColor(getColor(R.color.text_E1E1E1)); |
| | | viewBinding.homeLoginLine2V.setBackgroundColor(getColor(R.color.text_FF5A5A5A)); |
| | | viewBinding.homeLoginPasswordTextErrorTv.setText(""); |
| | | |
| | | } |
| | |
| | | public void updateDrawState(@NonNull TextPaint ds) { |
| | | super.updateDrawState(ds); |
| | | //设置字体颜色 |
| | | ds.setColor(getResources().getColor(R.color.text_245EC3, null)); |
| | | ds.setColor(getResources().getColor(R.color.text_E6FFFFFF, null)); |
| | | // 去掉下划线 |
| | | ds.setUnderlineText(false); |
| | | ds.setUnderlineText(!UserConfigManage.getInstance().isZh()); |
| | | } |
| | | |
| | | |
| | | }, startIndex1, endIndex1, 0); |
| | | spannable.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), startIndex1, endIndex1, 0); |
| | | // spannable.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), startIndex1, endIndex1, 0); |
| | | |
| | | spannable.setSpan(new ClickableSpan() { |
| | | @Override |
| | |
| | | public void updateDrawState(@NonNull TextPaint ds) { |
| | | super.updateDrawState(ds); |
| | | //设置字体颜色 |
| | | ds.setColor(getResources().getColor(R.color.text_245EC3, null)); |
| | | ds.setColor(getResources().getColor(R.color.text_E6FFFFFF, null)); |
| | | // 去掉下划线 |
| | | ds.setUnderlineText(false); |
| | | ds.setUnderlineText(!UserConfigManage.getInstance().isZh()); |
| | | } |
| | | |
| | | |
| | | }, startIndex2, endIndex2, 0); |
| | | spannable.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), startIndex2, endIndex2, 0); |
| | | // spannable.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), startIndex2, endIndex2, 0); |
| | | |
| | | |
| | | } |