From 8eaca2eff8e2e8f883c799133934b2eb2784601f Mon Sep 17 00:00:00 2001 From: archurtan Date: Thu, 23 Jun 2022 20:02:43 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90ID869532311=E3=80=91App=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9A=90=E7=A7=81=E5=90=88=E8=A7=84=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E9=A3=8E=E9=99=A9=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D-?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=8D=8F=E8=AE=AE=E5=BC=B9=E6=A1=86=E5=86=85?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=9A=90=E7=A7=81=E6=91=98=E8=A6=81=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit http://tapd.oa.com/NEW_IOT/prong/stories/view/1020393192869532311 Change-Id: I78697c217572312bd942d9f40f3b6dba0acf35f6 --- .../link/customview/dialog/UserAgreeDialog.kt | 36 +++++++++++++------ .../kitlink/activity/PrivicyDialogActivity.kt | 8 +++++ .../link/kitlink/consts/CommonField.kt | 2 ++ app/src/main/res/values-en-rUS/strings.xml | 2 ++ app/src/main/res/values-zh-rCN/strings.xml | 2 ++ app/src/main/res/values/strings.xml | 2 ++ 6 files changed, 42 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/tencent/iot/explorer/link/customview/dialog/UserAgreeDialog.kt b/app/src/main/java/com/tencent/iot/explorer/link/customview/dialog/UserAgreeDialog.kt index ddc36a1e1..c14dd7e4b 100644 --- a/app/src/main/java/com/tencent/iot/explorer/link/customview/dialog/UserAgreeDialog.kt +++ b/app/src/main/java/com/tencent/iot/explorer/link/customview/dialog/UserAgreeDialog.kt @@ -52,25 +52,38 @@ class UserAgreeDialog(context: Context) : IosCenterStyleDialog(context, R.layout val agreeContentStrPrefix = context.getString(R.string.rule_content_prefix) val partStr1 = "《${context.getString(R.string.register_agree_2)}》" val partStr2 = context.getString(R.string.register_agree_3) - val partStr3 = "《${context.getString(R.string.register_agree_4)}》" + + val partStr3 = "《${context.getString(R.string.summary_of_privacy_policy)}》" + val partStr4 = context.getString(R.string.pause_mark) + + val partStr5 = "《${context.getString(R.string.register_agree_4)}》" val agreeContentStrMiddle = context.getString(R.string.rule_content_middle) - val partStr4 = "《${context.getString(R.string.app_logo_name)}App${context.getString(R.string.personal_information_list)}》" + val partStr6 = "《${context.getString(R.string.app_logo_name)}App${context.getString(R.string.personal_information_list)}》" val agreeContentStrMiddle2 = context.getString(R.string.rule_content_middle2) - val partStr5 = "《${context.getString(R.string.rule_content_list)}》" + val partStr7 = "《${context.getString(R.string.rule_content_list)}》" val agreeContentStrSuffix = context.getString(R.string.rule_content_suffix) - var agreeContentStr = agreeContentStrPrefix + partStr1 + partStr2 + partStr3 + agreeContentStrMiddle + partStr4 + agreeContentStrMiddle2 + partStr5 + agreeContentStrSuffix + var agreeContentStr = agreeContentStrPrefix + partStr1 + partStr2 + partStr3 + partStr4 + partStr5 + agreeContentStrMiddle + partStr6 + agreeContentStrMiddle2 + partStr7 + agreeContentStrSuffix var agreeContentSpannable = SpannableStringBuilder(agreeContentStr) + agreeContentSpannable.setSpan(IndexClickableSpan(context, 1), agreeContentStrPrefix.length, agreeContentStrPrefix.length + partStr1.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) + val start1 = agreeContentStrPrefix.length + partStr1.length + partStr2.length agreeContentSpannable.setSpan(IndexClickableSpan(context, 2), start1, start1 + partStr3.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) - val start2 = agreeContentStrPrefix.length + partStr1.length + partStr2.length + partStr3.length + agreeContentStrMiddle.length + + val start2 = agreeContentStrPrefix.length + partStr1.length + partStr2.length + partStr3.length + partStr4.length agreeContentSpannable.setSpan(IndexClickableSpan(context, 3), - start2, start2 + partStr4.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) - val start3 = agreeContentStrPrefix.length + partStr1.length + partStr2.length + partStr3.length + agreeContentStrMiddle.length + partStr4.length + agreeContentStrMiddle2.length + start2, start2 + partStr5.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) + + val start3 = agreeContentStrPrefix.length + partStr1.length + partStr2.length + partStr3.length + partStr4.length + partStr5.length + agreeContentStrMiddle.length agreeContentSpannable.setSpan(IndexClickableSpan(context, 4), - start3, start3 + partStr5.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) + start3, start3 + partStr6.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) + + val start4 = agreeContentStrPrefix.length + partStr1.length + partStr2.length + partStr3.length + partStr4.length + partStr5.length + agreeContentStrMiddle.length + partStr6.length + agreeContentStrMiddle2.length + agreeContentSpannable.setSpan(IndexClickableSpan(context, 5), + start4, start4 + partStr7.length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) + tv_tip_content?.movementMethod = LinkMovementMethod.getInstance() tv_tip_content?.text = agreeContentSpannable @@ -109,6 +122,7 @@ class UserAgreeDialog(context: Context) : IosCenterStyleDialog(context, R.layout fun onOkClickedPrivacyPolicy() fun onOkClickedPersonalInfoList() fun onOkClickedThirdSDKList() + fun onClickedPrivacyPolicySummary() } fun setOnDismisListener(onDismisListener: OnDismisListener?) { @@ -133,10 +147,12 @@ class UserAgreeDialog(context: Context) : IosCenterStyleDialog(context, R.layout if (index == 1) { onDismisListener?.onOkClickedUserAgreement() } else if (index == 2) { - onDismisListener?.onOkClickedPrivacyPolicy() + onDismisListener?.onClickedPrivacyPolicySummary() } else if (index == 3) { - onDismisListener?.onOkClickedPersonalInfoList() + onDismisListener?.onOkClickedPrivacyPolicy() } else if (index == 4) { + onDismisListener?.onOkClickedPersonalInfoList() + } else if (index == 5) { onDismisListener?.onOkClickedThirdSDKList() } } diff --git a/app/src/main/java/com/tencent/iot/explorer/link/kitlink/activity/PrivicyDialogActivity.kt b/app/src/main/java/com/tencent/iot/explorer/link/kitlink/activity/PrivicyDialogActivity.kt index 8865661c6..2c93f258f 100644 --- a/app/src/main/java/com/tencent/iot/explorer/link/kitlink/activity/PrivicyDialogActivity.kt +++ b/app/src/main/java/com/tencent/iot/explorer/link/kitlink/activity/PrivicyDialogActivity.kt @@ -85,6 +85,14 @@ class PrivicyDialogActivity : BaseActivity() { OpensourceLicenseActivity.startWebWithExtra(this@PrivicyDialogActivity, getString(R.string.rule_content_list), CommonField.THIRD_SDK_URL_US_EN) } } + + override fun onClickedPrivacyPolicySummary() { + val intent = Intent(this@PrivicyDialogActivity, WebActivity::class.java) + intent.putExtra(CommonField.EXTRA_TITLE, getString(R.string.summary_of_privacy_policy)) + var url = CommonField.PRIVACY_POLICY_SUMMARY_URL_CN_ZH + intent.putExtra(CommonField.EXTRA_TEXT, url) + startActivity(intent) + } }) } diff --git a/app/src/main/java/com/tencent/iot/explorer/link/kitlink/consts/CommonField.kt b/app/src/main/java/com/tencent/iot/explorer/link/kitlink/consts/CommonField.kt index 07ed6766e..72a13f07f 100644 --- a/app/src/main/java/com/tencent/iot/explorer/link/kitlink/consts/CommonField.kt +++ b/app/src/main/java/com/tencent/iot/explorer/link/kitlink/consts/CommonField.kt @@ -140,6 +140,8 @@ object CommonField { const val THIRD_SDK_URL_US_EN = "http://qzonestyle.gtimg.cn/qzone/qzactStatics/qcloud/data/42/config13.js" const val PERSONAL_INFO_URL_US_ZH = "https://privacy.qq.com/document/preview/278bbbbbdd5748999fce491cfa6dd424" const val PERSONAL_INFO_URL_US_EN = "http://qzonestyle.gtimg.cn/qzone/qzactStatics/qcloud/data/42/config15.js" + const val PRIVACY_POLICY_SUMMARY_URL_CN_ZH = "https://privacy.qq.com/document/preview/4f262b760a4543a7a26409064d1391c2" + const val PRIVACY_POLICY_SUMMARY_URL_CN_EN = "https://privacy.qq.com/document/preview/4f262b760a4543a7a26409064d1391c2" /************返回结果通用字段*************/ const val RESPONSE = "Response" diff --git a/app/src/main/res/values-en-rUS/strings.xml b/app/src/main/res/values-en-rUS/strings.xml index 088ed851a..61835e03d 100644 --- a/app/src/main/res/values-en-rUS/strings.xml +++ b/app/src/main/res/values-en-rUS/strings.xml @@ -164,6 +164,8 @@  and  Privacy Policy privacy policy + Summary of Privacy Policy + Open-Source Software Info Send The verification code has been sent to your phone: diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index be27d9642..472e11b0b 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -164,6 +164,8 @@ 隐私政策 隐私政策 + 隐私政策摘要 + 开源软件信息 获取验证码 验证码已经发送到您的手机: diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index be27d9642..472e11b0b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -164,6 +164,8 @@ 隐私政策 隐私政策 + 隐私政策摘要 + 开源软件信息 获取验证码 验证码已经发送到您的手机: