From a9123c33ed629d405e46ca695e8551e29234c821 Mon Sep 17 00:00:00 2001 From: lijia Date: Fri, 15 Mar 2024 16:53:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E6=AC=A1=E8=BF=9B=E5=85=A5app?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/dahe/gldriver/base/AppConfig.kt | 1 + .../com/dahe/gldriver/mypop/AgreementAlert.kt | 97 +++++++++++++++++++ .../java/com/dahe/gldriver/ui/HomeActivity.kt | 3 +- .../com/dahe/gldriver/ui/LauncherActivity.kt | 53 +++++----- .../dahe/gldriver/ui/account/LoginActivity.kt | 8 +- .../com/dahe/gldriver/utils/CommonPopUtils.kt | 39 ++++++-- .../java/com/dahe/gldriver/utils/SPUtils.kt | 9 ++ app/src/main/res/layout/activity_login.xml | 1 + app/src/main/res/layout/alert_ok_cancel.xml | 62 ++++++++++++ 9 files changed, 239 insertions(+), 34 deletions(-) create mode 100644 app/src/main/java/com/dahe/gldriver/mypop/AgreementAlert.kt create mode 100644 app/src/main/res/layout/alert_ok_cancel.xml diff --git a/app/src/main/java/com/dahe/gldriver/base/AppConfig.kt b/app/src/main/java/com/dahe/gldriver/base/AppConfig.kt index fa5842e..54d04c9 100644 --- a/app/src/main/java/com/dahe/gldriver/base/AppConfig.kt +++ b/app/src/main/java/com/dahe/gldriver/base/AppConfig.kt @@ -14,6 +14,7 @@ object AppConfig { const val ORDER_ID = "DA_HE_ORDER_ID" const val CAR_ID = "DA_HE_CAR_ID" const val IS_SHOW = "DA_HE_IS_SHOW" + const val IS_FIRST_OPEN = "DA_HE_IS_FIRST_OPEN" const val WAYBILL_ID = "DA_HE_WAYBILL_ID" const val CHILDRE_ID = "DA_HE_CHILDRE_ID" const val CODE = "DA_HE_PHONE" diff --git a/app/src/main/java/com/dahe/gldriver/mypop/AgreementAlert.kt b/app/src/main/java/com/dahe/gldriver/mypop/AgreementAlert.kt new file mode 100644 index 0000000..7dadfc2 --- /dev/null +++ b/app/src/main/java/com/dahe/gldriver/mypop/AgreementAlert.kt @@ -0,0 +1,97 @@ +package com.dahe.gldriver.mypop + +import android.content.Context +import android.content.Intent +import android.os.Handler +import android.text.SpannableStringBuilder +import android.text.TextPaint +import android.text.method.LinkMovementMethod +import android.text.style.ClickableSpan +import android.view.Gravity +import android.view.View +import android.widget.Button +import android.widget.TextView +import com.dahe.gldriver.R +import com.dahe.gldriver.base.WebActivity +import com.dahe.gldriver.callback.OnResultListener +import com.lxj.xpopup.core.CenterPopupView + +/** + * @author hlh + * @version 1.0.0 + * @date 2021/10/13 10:30 + * @description: + */ +class AgreementAlert( + private val con: Context, + private val url: String, + private val url2: String, + private val listener: OnResultListener +) : CenterPopupView( + con +) { + override fun getImplLayoutId(): Int { + return R.layout.alert_ok_cancel + } + + // 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑 + override fun onCreate() { + super.onCreate() + val tv_title = findViewById(R.id.tv_title) + val tv_content = findViewById(R.id.tv_content) + val tv_cancel = findViewById