From 20119c1e9849ab28add56b977ffbca87e13e1072 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期五, 14 二月 2025 10:47:09 +0800 Subject: [PATCH] 2025年02月14日10:46:45 --- app/src/main/java/com/hdl/photovoltaic/ui/account/RegisterAccountActivity.java | 39 +++++++++++++++++++++++---------------- 1 files changed, 23 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/account/RegisterAccountActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/account/RegisterAccountActivity.java index ad48488..e12bcc5 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/account/RegisterAccountActivity.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/account/RegisterAccountActivity.java @@ -24,6 +24,7 @@ import com.hdl.photovoltaic.databinding.ActivityRegisterAccountBinding; import com.hdl.photovoltaic.listener.CloudCallBeak; import com.hdl.photovoltaic.other.HdlAccountLogic; +import com.hdl.photovoltaic.other.HdlCommonLogic; import com.hdl.photovoltaic.other.HdlLogLogic; import com.hdl.photovoltaic.other.HdlThreadLogic; import com.hdl.photovoltaic.utils.KeyboardStateObserverUtils; @@ -65,7 +66,8 @@ @Override public void onBindView(Bundle savedInstanceState) { - setStatusBarTranslucent(); + setStatusBarTranslucent(); + getWindow().setNavigationBarColor(getColor(R.color.text_00000000)); //鍒濆鍖� initView(); //鍒濆鍖栫晫闈㈢洃鍚櫒 @@ -75,8 +77,7 @@ public void onKeyboardShow(int h) { ConstraintSet cs = new ConstraintSet(); cs.clone(viewBinding.parentCl); - cs.connect(viewBinding.registerConfirmPswEt.getId(), ConstraintSet.BOTTOM, ConstraintSet.PARENT_ID, ConstraintSet.BOTTOM, px2dip(h)) - ;// + cs.connect(viewBinding.registerConfirmPswEt.getId(), ConstraintSet.BOTTOM, ConstraintSet.PARENT_ID, ConstraintSet.BOTTOM, px2dip(h));// //搴旂敤绾︽潫 cs.applyTo(viewBinding.parentCl); } @@ -110,6 +111,8 @@ } catch (Exception e) { e.printStackTrace(); } + HdlCommonLogic.getInstance().setSpan(viewBinding.registerPhoneVerificationTv, viewBinding.registerPhoneVerificationTv.getText().toString(), true, null); + HdlCommonLogic.getInstance().setSpan(viewBinding.registerMailVerificationTv, viewBinding.registerMailVerificationTv.getText().toString(), true, null); } private void initEvent() { @@ -358,7 +361,7 @@ long time = (millisUntilFinished / 1000); String str = time + "s" + getString(R.string.home_login_psw_verification_repeater); viewBinding.registerPhoneVerificationTv.setText(str); - viewBinding.registerPhoneVerificationTv.setTextColor(getResources().getColor(R.color.text_25000000, null)); +// viewBinding.registerPhoneVerificationTv.setTextColor(getResources().getColor(R.color.text_25000000, null)); viewBinding.registerPhoneVerificationTv.setEnabled(false); } @@ -366,7 +369,7 @@ @Override public void onFinish() { viewBinding.registerPhoneVerificationTv.setText(getString(R.string.home_login_verification_regain)); - viewBinding.registerPhoneVerificationTv.setTextColor(getResources().getColor(R.color.text_245EC3, null)); +// viewBinding.registerPhoneVerificationTv.setTextColor(getResources().getColor(R.color.text_245EC3, null)); viewBinding.registerPhoneVerificationTv.setEnabled(true); @@ -382,7 +385,7 @@ String str = time + "s" + getString(R.string.home_login_psw_verification_repeater); viewBinding.registerMailVerificationTv.setText(str); - viewBinding.registerMailVerificationTv.setTextColor(getResources().getColor(R.color.text_25000000, null)); +// viewBinding.registerMailVerificationTv.setTextColor(getResources().getColor(R.color.text_E6FFFFFF, null)); viewBinding.registerMailVerificationTv.setEnabled(false); } @@ -390,7 +393,7 @@ @Override public void onFinish() { viewBinding.registerMailVerificationTv.setText(getString(R.string.home_login_verification_regain)); - viewBinding.registerMailVerificationTv.setTextColor(getResources().getColor(R.color.text_245EC3, null)); +// viewBinding.registerMailVerificationTv.setTextColor(getResources().getColor(R.color.text_E6FFFFFF, null)); viewBinding.registerMailVerificationTv.setEnabled(true); } @@ -403,8 +406,7 @@ CountryPickerFragment dialog = new CountryPickerFragment(this, new PickCountryCallback() { @Override public void onPick(Country country) { - if (country.flag != 0) - viewBinding.regionAccountTv.setText(country.name); + if (country.flag != 0) viewBinding.regionAccountTv.setText(country.name); viewBinding.regionAccountNumberTv.setText("+" + country.code); } }); @@ -421,13 +423,13 @@ if (isPhoneType) { //鎵嬫満鍙� viewBinding.registerPhoneTitleIc.accountTitleTv.setText(R.string.home_login_phone); - viewBinding.registerPhoneTitleIc.accountTitleTv.setTextSize(20); - viewBinding.registerPhoneTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_E6000000, null)); + viewBinding.registerPhoneTitleIc.accountTitleTv.setTextSize(18); + viewBinding.registerPhoneTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_E6FFFFFF, null)); viewBinding.registerPhoneTitleIc.lineV.setVisibility(View.VISIBLE); viewBinding.registerMailTitleIc.accountTitleTv.setText(R.string.home_login_email); - viewBinding.registerMailTitleIc.accountTitleTv.setTextSize(16); - viewBinding.registerMailTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_66000000, null)); + viewBinding.registerMailTitleIc.accountTitleTv.setTextSize(14); + viewBinding.registerMailTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF, null)); viewBinding.registerMailTitleIc.lineV.setVisibility(View.GONE); //鏄剧ず鍖哄彿 viewBinding.registerRegionAccountRl.setVisibility(View.VISIBLE); @@ -453,12 +455,12 @@ //閭 viewBinding.registerPhoneTitleIc.accountTitleTv.setText(R.string.home_login_phone); viewBinding.registerPhoneTitleIc.accountTitleTv.setTextSize(16); - viewBinding.registerPhoneTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_66000000, null)); + viewBinding.registerPhoneTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF, null)); viewBinding.registerPhoneTitleIc.lineV.setVisibility(View.GONE); viewBinding.registerMailTitleIc.accountTitleTv.setText(R.string.home_login_email); - viewBinding.registerMailTitleIc.accountTitleTv.setTextSize(20); - viewBinding.registerMailTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_E6000000, null)); + viewBinding.registerMailTitleIc.accountTitleTv.setTextSize(18); + viewBinding.registerMailTitleIc.accountTitleTv.setTextColor(getResources().getColor(R.color.text_E6FFFFFF, null)); viewBinding.registerMailTitleIc.lineV.setVisibility(View.VISIBLE); //闅愯棌鍖哄彿 @@ -501,6 +503,11 @@ verification_code = viewBinding.registerMailVerificationEt.getText().toString(); } boolean isEnabled = account.length() > 0 && psw1.length() > 0 && psw2.length() > 0 && verification_code.length() > 0; + if (isEnabled) { + viewBinding.registerCompleteTv.setTextColor(getColor(R.color.text_E6FFFFFF)); + } else { + viewBinding.registerCompleteTv.setTextColor(getColor(R.color.text_66FFFFFF)); + } viewBinding.registerCompleteTv.setEnabled(isEnabled); } -- Gitblit v1.8.0