Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
677a435b
Commit
677a435b
authored
Jun 20, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:注册登录未勾选协议下一步弹窗 让用户选择默认勾选协议
parent
f35d39b7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
110 additions
and
5 deletions
+110
-5
RegisterAndLoginActivity.kt
m-user/src/main/java/com/yidianling/user/ui/login/RegisterAndLoginActivity.kt
+29
-4
user_agree_dialog_top_right_left.xml
m-user/src/main/res/drawable/user_agree_dialog_top_right_left.xml
+8
-0
user_agree_privacy_dialog.xml
m-user/src/main/res/layout/user_agree_privacy_dialog.xml
+72
-0
ErrorMessageConverter.java
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/util/ErrorMessageConverter.java
+1
-1
No files found.
m-user/src/main/java/com/yidianling/user/ui/login/RegisterAndLoginActivity.kt
View file @
677a435b
...
...
@@ -4,11 +4,13 @@ import android.annotation.SuppressLint
import
android.content.Context
import
android.content.Intent
import
android.graphics.Color
import
android.net.Uri
import
android.os.Handler
import
android.text.*
import
android.text.method.LinkMovementMethod
import
android.text.style.AbsoluteSizeSpan
import
android.text.style.ClickableSpan
import
android.view.Gravity
import
android.view.View
import
android.view.animation.AnimationUtils
import
androidx.core.content.ContextCompat
...
...
@@ -51,6 +53,8 @@ import com.yidianling.user.safePrivate.HandUnlockCheckActivity
import
com.yidianling.user.ui.CountryListActivity
import
com.yidianling.user.ui.login.contract.ILoginContract
import
com.yidianling.user.ui.login.presenter.LoginPresenterImpl
import
com.yidianling.user.widget.ZDialog
import
com.yidianling.user.widget.ZDialogDirection
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.schedulers.Schedulers
import
kotlinx.android.synthetic.main.user_activity_register_and_login_bottom.*
...
...
@@ -78,6 +82,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
private
var
handler
:
Handler
?
=
null
private
var
isFromGuide
=
false
//是否来自启动页
private
var
isFromOneKeyLogin
=
false
// 是否来自一键登录界面
private
var
mAgreePrivacyDialog
:
ZDialog
?
=
null
companion
object
{
private
var
BIND_PHONE
=
"bind_phone"
//用于判断时候是绑定手机号
...
...
@@ -320,6 +325,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
/**
* 设置点击事件
*/
@SuppressLint
(
"WrongConstant"
)
private
fun
setClickEvent
()
{
skip_bind
.
setOnClickListener
{
ActionCountUtils
.
count
(
UserBIConstants
.
USER_REGISTER_PAGE_SKIP_CLICK
)
...
...
@@ -393,12 +399,31 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
startActivityForResult
(
intent
,
REQUEST_CODE_COUNTRY
)
overridePendingTransition
(
R
.
anim
.
platform_slide_in_from_bottom
,
R
.
anim
.
user_slide_null
)
}
//下一步
ll_next
.
setOnClickListener
{
if
(
iv_select_protocol
.
visibility
==
View
.
VISIBLE
&&
!
isAgreeProtocol
)
{
val
shake
=
AnimationUtils
.
loadAnimation
(
this
,
R
.
anim
.
user_shake_input
)
//加载动画资源文件
check_protocol
.
startAnimation
(
shake
)
ToastUtil
.
toastShort
(
"请您先同意壹点灵《用户使用协议》、《隐私保护政策》,才能登录使用"
)
if
(
iv_select_protocol
.
visibility
==
View
.
VISIBLE
&&
!
isAgreeProtocol
&&
!
et_phone_number
.
text
.
isNullOrEmpty
())
{
if
(
mAgreePrivacyDialog
==
null
)
{
mAgreePrivacyDialog
=
ZDialog
.
Builder
(
this
)
.
setGravity
(
ZDialogDirection
.
FROM_BOTTOM
)
.
setContentView
(
R
.
layout
.
user_agree_privacy_dialog
)
.
setOnClickListener
(
R
.
id
.
user_dialog_no_agree
)
{
mAgreePrivacyDialog
?.
dismiss
()
mAgreePrivacyDialog
=
null
}
.
setAnimation
(
0
)
//取消动画
.
setFullScreen
()
.
setCancelAble
(
true
)
.
setOnClickListener
(
R
.
id
.
user_dialog_secret_agree
)
{
mAgreePrivacyDialog
?.
dismiss
()
mAgreePrivacyDialog
=
null
//勾选隐私协议 TODO
}
.
show
()
}
else
{
mAgreePrivacyDialog
!!
.
show
()
}
return
@setOnClickListener
}
if
(
checkPhone
())
{
...
...
m-user/src/main/res/drawable/user_agree_dialog_top_right_left.xml
0 → 100644
View file @
677a435b
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:topLeftRadius=
"@dimen/platform_dp_8"
android:topRightRadius=
"@dimen/platform_dp_8"
/>
<solid
android:color=
"@color/white"
/>
</shape>
\ No newline at end of file
m-user/src/main/res/layout/user_agree_privacy_dialog.xml
0 → 100644
View file @
677a435b
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/user_agree_dialog_top_right_left"
>
<TextView
android:id=
"@+id/user_agree_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/platform_dp_28"
android:text=
"使用协议及隐私保护"
android:textColor=
"@color/pay_color_242424"
android:textSize=
"18sp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
></TextView>
<TextView
android:id=
"@+id/user_agree_dialog_protocol"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/platform_dp_28"
android:text=
"请先同意协议才能登录使用哦"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/user_agree_title"
></TextView>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/platform_dp_40"
android:layout_marginTop=
"@dimen/platform_dp_28"
android:layout_marginRight=
"@dimen/platform_dp_40"
android:layout_marginBottom=
"@dimen/platform_dp_40"
android:background=
"#ffffff"
android:orientation=
"horizontal"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/user_agree_dialog_protocol"
>
<TextView
android:id=
"@+id/user_dialog_no_agree"
android:layout_width=
"wrap_content"
android:layout_height=
"44dp"
android:layout_marginRight=
"@dimen/platform_dp_12"
android:layout_weight=
"1"
android:background=
"@drawable/user_secret_left_btn_bg"
android:gravity=
"center"
android:text=
"拒绝"
android:textColor=
"#999999"
android:textSize=
"17sp"
/>
<TextView
android:id=
"@+id/user_dialog_secret_agree"
android:layout_width=
"wrap_content"
android:layout_height=
"44dp"
android:layout_marginLeft=
"5.5dp"
android:layout_weight=
"1"
android:background=
"@drawable/user_secret_right_btn_bg"
android:gravity=
"center"
android:text=
"同意"
android:textColor=
"#FFFFFF"
android:textSize=
"17sp"
android:textStyle=
"bold"
/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/util/ErrorMessageConverter.java
View file @
677a435b
...
...
@@ -690,7 +690,7 @@ public class ErrorMessageConverter {
return
getLocalizedString
(
R
.
string
.
TUIKitErrorSVRNoSuccessResult
);
// @"批量操作无成功结果";
case
BaseConstants
.
ERR_TO_USER_INVALID
:
return
getLocalizedString
(
R
.
string
.
TUIKitErrorSVRToUserInvalid
);
// @"IM: 无效接收方";
case
BaseConstants
.
ERR_REQUEST_TIMEOUT
:
case
BaseConstants
.
ERR_REQUEST_TIME
_
OUT
:
return
getLocalizedString
(
R
.
string
.
TUIKitErrorSVRRequestTimeout
);
// @"请求超时";
case
BaseConstants
.
ERR_INIT_CORE_FAIL
:
return
getLocalizedString
(
R
.
string
.
TUIKitErrorSVRInitCoreFail
);
// @"INIT CORE模块失败";
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment