| | |
| | | import com.hdl.photovoltaic.base.CustomBaseActivity; |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.databinding.ActivityHomeLoginBinding; |
| | | import com.hdl.photovoltaic.enums.Languages; |
| | | import com.hdl.photovoltaic.other.HdlLogLogic; |
| | | import com.hdl.photovoltaic.other.HdlPushLogic; |
| | | import com.hdl.photovoltaic.other.HdlResidenceLogic; |
| | | import com.hdl.photovoltaic.other.HdlUniLogic; |
| | | import com.hdl.photovoltaic.ui.account.ChangePassword; |
| | |
| | | }, 0, forgetPasswordTvStr.length(), 0); |
| | | viewBinding.homeLoginForgetPasswordTv.setText(forgetPasswordTvStrSpannable); |
| | | |
| | | LanguageAdapter.ItemData language= LocalManageUtil.getLanguage(UserConfigManage.getInstance().getCurrentAppLanguage()); |
| | | viewBinding.homeLoginLanguageTv.setText(language.getTitle()); |
| | | |
| | | if (UserConfigManage.getInstance().getCurrentAppLanguage().equals(LocalManageUtil.zh)) { |
| | | viewBinding.homeLoginLanguageTv.setText("简体中文"); |
| | | } else { |
| | | viewBinding.homeLoginLanguageTv.setText("English"); |
| | | } |
| | | if (UserConfigManage.getInstance().isBAccount()) { |
| | | viewBinding.homeLoginRegisterTv.setVisibility(View.GONE); |
| | | } else { |
| | |
| | | |
| | | int startIndex2 = s.lastIndexOf("《"); |
| | | int endIndex2 = s.lastIndexOf("》") + 1; |
| | | if (UserConfigManage.getInstance().getCurrentAppLanguage().equals(LocalManageUtil.en)) { |
| | | if (UserConfigManage.getInstance().getCurrentAppLanguage().equals(Languages.en)) { |
| | | s = s.replace("《", "").replace("》", ""); |
| | | endIndex1 -= 1; |
| | | startIndex2 -= 2;//移除"《"和"》"总长度发生变化,索引也改变; |
| | |
| | | //设置字体颜色 |
| | | ds.setColor(getResources().getColor(text_color, null)); |
| | | // 去掉下划线 |
| | | ds.setUnderlineText(!UserConfigManage.getInstance().isZh()); |
| | | ds.setUnderlineText(!UserConfigManage.getInstance().getCurrentAppLanguage().equals(Languages.zh)); |
| | | } |
| | | |
| | | |
| | |
| | | //设置字体颜色 |
| | | ds.setColor(getResources().getColor(text_color, null)); |
| | | // 去掉下划线 |
| | | ds.setUnderlineText(!UserConfigManage.getInstance().isZh()); |
| | | ds.setUnderlineText(!UserConfigManage.getInstance().getCurrentAppLanguage().equals(Languages.zh)); |
| | | } |
| | | |
| | | }, startIndex2, endIndex2, 0); |