| | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | setStatusBarTranslucent(); |
| | | getWindow().setNavigationBarColor(getColor(R.color.text_FF000000)); |
| | | this.typeIntValue = getIntent().getIntExtra("type", 0); |
| | | //初始化 |
| | | initView(); |
| | |
| | | private void initView() { |
| | | viewBinding.contentView.getSettings().setJavaScriptEnabled(true); |
| | | //xml里面设置背景无效 |
| | | viewBinding.contentView.setBackgroundColor(getColor(R.color.text_FF161616)); |
| | | viewBinding.contentView.setBackgroundColor(getColor(R.color.text_FF000000)); |
| | | if (this.typeIntValue == 0) { |
| | | viewBinding.toolbarTopRl.topTitleTv.setText(R.string.app_service_agreement); |
| | | } else { |
| | | viewBinding.toolbarTopRl.topTitleTv.setText(R.string.app_privacy_policy); |
| | | } |
| | | viewBinding.toolbarTopRl.topBackLl.setVisibility(View.VISIBLE); |
| | | |
| | | if (UserConfigManage.getInstance().getCurrentAppLanguage().equals(LocalManageUtil.zh)) { |
| | | //中文 |
| | | if (this.typeIntValue == 0) { |
| | | //用户协议 |
| | | viewBinding.contentView.loadUrl("https://nearest.hdlcontrol.com/common-h5/#/pages/greenEnergyAgreement/userAgreement"); |
| | | //用户协议 https://nearest.hdlcontrol.com |
| | | viewBinding.contentView.loadUrl("https://common.hdlcontrol.com/common-h5/#/pages/greenEnergyAgreement/userAgreement"); |
| | | } else { |
| | | //隐私协议 |
| | | viewBinding.contentView.loadUrl("https://nearest.hdlcontrol.com/common-h5/#/pages/greenEnergyAgreement/privacyAgreement"); |
| | | viewBinding.contentView.loadUrl("https://common.hdlcontrol.com/common-h5/#/pages/greenEnergyAgreement/privacyAgreement"); |
| | | } |
| | | } else { |
| | | //英文 |
| | | if (this.typeIntValue == 0) { |
| | | //用户协议 |
| | | viewBinding.contentView.loadUrl("https://nearest.hdlcontrol.com/common-h5/#/pages/greenEnergyAgreement/userAgreementEn"); |
| | | viewBinding.contentView.loadUrl("https://common.hdlcontrol.com/common-h5/#/pages/greenEnergyAgreement/userAgreementEn"); |
| | | } else { |
| | | //隐私协议 |
| | | viewBinding.contentView.loadUrl("https://nearest.hdlcontrol.com/common-h5/#/pages/greenEnergyAgreement/privacyAgreementEn"); |
| | | viewBinding.contentView.loadUrl("https://common.hdlcontrol.com/common-h5/#/pages/greenEnergyAgreement/privacyAgreementEn"); |
| | | } |
| | | } |
| | | |