| | |
| | | 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.HdlResidenceLogic; |
| | | import com.hdl.photovoltaic.other.HdlUniLogic; |
| | |
| | | }, 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 { |
| | |
| | | intent.setClass(HDLApp.getInstance(), StartActivity.class); |
| | | startActivity(intent); |
| | | viewBinding.homeLoginLanguageTv.setText(itemData.getTitle()); |
| | | HdlResidenceLogic.getInstance().pushAdd(new CloudCallBeak<String>() { |
| | | @Override |
| | | public void onSuccess(String pushId) { |
| | | HdlLogLogic.print("添加令牌到云端 PushToken:" + UserConfigManage.getInstance().getPushToken() + " pushId:" + pushId, true); |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(HDLException e) { |
| | | HdlLogLogic.print("添加令牌到云端失败 PushToken:" + UserConfigManage.getInstance().getPushToken() + " 错误:" + e.getMessage(), true); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | |
| | | 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); |