From 13420bde01402f662559045910bf0dece36a3926 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 10 四月 2025 16:35:02 +0800
Subject: [PATCH] 2025年04月10日16:35:00

---
 app/src/main/java/com/hdl/photovoltaic/ui/LoginActivity.java |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/LoginActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/LoginActivity.java
index 930817f..1178f32 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/LoginActivity.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/LoginActivity.java
@@ -106,7 +106,7 @@
         try {
             viewBinding.homeLoginCheckBCCl.setSelected(UserConfigManage.getInstance().isBAccount());
             viewBinding.homeLoginPrivacyCheckIv.setSelected(UserConfigManage.getInstance().isAcceiptPolicy());
-            setStringDifferentColors(viewBinding.homeLoginPrivacyTv);
+            setStringDifferentColors(viewBinding.homeLoginPrivacyTv,false);
 
             //娉ㄥ唽鍜屽繕璁板瘑鐮侀渶瑕佸姞涓嬪垝绾�
             String registerTvStr = viewBinding.homeLoginRegisterTv.getText().toString();
@@ -517,12 +517,13 @@
     /**
      * 璁剧疆涓�涓插瓧绗﹀绉嶉鑹蹭互鍙婄偣鍑讳簨浠�
      *
-     * @param textView 褰撳墠缁勪欢
+     * @param textView    褰撳墠缁勪欢
+     * @param isHighlight 鏄惁楂樹寒锛坱rue琛ㄧず楂樹寒锛�
      */
-    private void setStringDifferentColors(TextView textView) {
+    private void setStringDifferentColors(TextView textView, boolean isHighlight) {
         try {
 
-
+            int text_color = isHighlight ? R.color.text_38C494 : R.color.text_FFACACAC;
             if (textView == null) {
                 return;
             }
@@ -560,8 +561,9 @@
                     @Override
                     public void updateDrawState(@NonNull TextPaint ds) {
                         super.updateDrawState(ds);
+
                         //璁剧疆瀛椾綋棰滆壊
-                        ds.setColor(getResources().getColor(R.color.text_FFACACAC, null));
+                        ds.setColor(getResources().getColor(text_color, null));
                         // 鍘绘帀涓嬪垝绾�
                         ds.setUnderlineText(!UserConfigManage.getInstance().isZh());
                     }
@@ -584,11 +586,10 @@
                     public void updateDrawState(@NonNull TextPaint ds) {
                         super.updateDrawState(ds);
                         //璁剧疆瀛椾綋棰滆壊
-                        ds.setColor(getResources().getColor(R.color.text_FFACACAC, null));
+                        ds.setColor(getResources().getColor(text_color, null));
                         // 鍘绘帀涓嬪垝绾�
                         ds.setUnderlineText(!UserConfigManage.getInstance().isZh());
                     }
-
 
                 }, startIndex2, endIndex2, 0);
 //                spannable.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), startIndex2, endIndex2, 0);
@@ -597,7 +598,7 @@
             }
             textView.setText(spannable);
             //涓�旈亣鍒扮偣鍑诲悗瀛椾綋鏄剧ず楂樹寒锛屽彇娑堥珮浜�
-            textView.setHighlightColor(getResources().getColor(R.color.text_FF5B5B5B, null));
+            textView.setHighlightColor(getResources().getColor(R.color.text_FFACACAC, null));
             //鏈�鍚庤缃彲鐐瑰嚮锛屽繀椤诲疄鐜帮紝鍚﹀垯鍙兘鏄剧ず鏍峰紡锛屾棤娉曞疄鐜扮偣鍑绘晥鏋�
             textView.setMovementMethod(LinkMovementMethod.getInstance());
         } catch (Exception ignored) {
@@ -615,7 +616,7 @@
         confirmationCancelDialog.show();
         confirmationCancelDialog.isHideTitle(true);
         confirmationCancelDialog.setContent(getString(R.string.loading_privacy_server));
-        setStringDifferentColors(confirmationCancelDialog.getContentTextView());
+        setStringDifferentColors(confirmationCancelDialog.getContentTextView(),true);
         confirmationCancelDialog.setConfirmation(getString(R.string.loading_agree));
         confirmationCancelDialog.setCancel(getString(R.string.loading_on_agree));
         confirmationCancelDialog.setYesOnclickListener(new ConfirmationCancelDialog.onYesOnclickListener() {

--
Gitblit v1.8.0