| | |
| | | |
| | | |
| | | import android.content.Intent; |
| | | import android.content.res.Configuration; |
| | | import android.graphics.Color; |
| | | import android.os.Build; |
| | | import android.os.Bundle; |
| | | import android.os.LocaleList; |
| | | import android.text.Editable; |
| | | import android.text.SpannableStringBuilder; |
| | | import android.text.TextPaint; |
| | |
| | | import android.text.method.PasswordTransformationMethod; |
| | | import android.text.style.ClickableSpan; |
| | | import android.text.style.StyleSpan; |
| | | import android.util.DisplayMetrics; |
| | | import android.view.View; |
| | | import android.widget.TextView; |
| | | |
| | |
| | | import com.hdl.photovoltaic.HDLApp; |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.CustomBaseActivity; |
| | | import com.hdl.photovoltaic.config.ConstantManage; |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.databinding.ActivityHomeLoginBinding; |
| | | import com.hdl.photovoltaic.other.HdlCommonLogic; |
| | | import com.hdl.photovoltaic.other.HdlResidenceLogic; |
| | | import com.hdl.photovoltaic.ui.account.ChangePassword; |
| | | import com.hdl.photovoltaic.ui.account.RegisterAccountActivity; |
| | |
| | | import com.hdl.photovoltaic.widget.adapter.ListDialogAdapter; |
| | | |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | |
| | | /** |
| | | * 登录的界面 |
| | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | setStatusBarTranslucent(); |
| | | getWindow().setNavigationBarColor(getColor(R.color.text_00000000)); |
| | | //初始化 |
| | | initView(); |
| | | //初始化界面监听器 |
| | |
| | | //设置字体颜色 |
| | | ds.setColor(getResources().getColor(R.color.text_E6FFFFFF, null)); |
| | | // 去掉下划线 |
| | | ds.setUnderlineText(!UserConfigManage.getInstance().isZh()); |
| | | ds.setUnderlineText(true); |
| | | } |
| | | |
| | | |
| | |
| | | //设置字体颜色 |
| | | ds.setColor(getResources().getColor(R.color.text_E6FFFFFF, null)); |
| | | // 去掉下划线 |
| | | ds.setUnderlineText(!UserConfigManage.getInstance().isZh()); |
| | | ds.setUnderlineText(true); |
| | | } |
| | | |
| | | |
| | |
| | | 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); |
| | |
| | | //设置字体颜色 |
| | | ds.setColor(getResources().getColor(R.color.text_E6FFFFFF, null)); |
| | | // 去掉下划线 |
| | | ds.setUnderlineText(!UserConfigManage.getInstance().isZh()); |
| | | ds.setUnderlineText(true); |
| | | } |
| | | |
| | | |
| | |
| | | //设置字体颜色 |
| | | ds.setColor(getResources().getColor(R.color.text_E6FFFFFF, null)); |
| | | // 去掉下划线 |
| | | ds.setUnderlineText(!UserConfigManage.getInstance().isZh()); |
| | | ds.setUnderlineText(true); |
| | | } |
| | | |
| | | |