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
2b292d02
Commit
2b292d02
authored
Dec 23, 2020
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:修改自定义验证码UIwidget
parent
533f8c46
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
49 deletions
+21
-49
AndroidManifest.xml
m-user/src/main/AndroidManifest.xml
+5
-0
testLoginActivity.kt
m-user/src/main/java/com/yidianling/user/ui/login/testLoginActivity.kt
+5
-48
SquarePinField.kt
m-user/src/main/java/com/yidianling/user/widget/PinField/SquarePinField.kt
+9
-1
user_activity_verfication_code_new.xml
m-user/src/main/res/layout/user_activity_verfication_code_new.xml
+2
-0
No files found.
m-user/src/main/AndroidManifest.xml
View file @
2b292d02
...
...
@@ -24,6 +24,11 @@
android:name=
".ui.GetIdentifyingCodeActivity"
android:theme=
"@style/platform_NoTitleTheme"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.login.testLoginActivity"
android:theme=
"@style/platform_NoTitleTheme"
android:screenOrientation=
"portrait"
>
</activity>
<activity
android:name=
".ui.FillInfoActivity"
android:theme=
"@style/platform_NoTitleTheme"
...
...
m-user/src/main/java/com/yidianling/user/ui/login/testLoginActivity.kt
View file @
2b292d02
...
...
@@ -175,9 +175,9 @@ class testLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginContract.Pr
)
)
{
runOnUiThread
{
et_phone_number
.
setPhoneText
(
mAutCheckResult
!!
.
simPhoneNumber
)
et_phone_number
.
setSelection
(
et_phone_number
.
text
.
length
)
iv_del
.
visibility
=
View
.
VISIBLE
//
et_phone_number.setPhoneText(mAutCheckResult!!.simPhoneNumber)
//
et_phone_number.setSelection(et_phone_number.text.length)
//
iv_del.visibility = View.VISIBLE
}
}
}
...
...
@@ -305,7 +305,7 @@ class testLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginContract.Pr
val
privacyOnOffType
=
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
?.
info
?.
protocol_android
?:
2
val
channel
=
WalleChannelReader
.
getChannel
(
applicationContext
)
if
(
channel
==
"huawei"
){
/*
if (channel=="huawei"){
iv_select_protocol.setImageResource(R.drawable.user_login_protocol_unselected)
}else if (privacyOnOffType == 2 && (channel=="vivo")){
iv_select_protocol.setImageResource(R.drawable.user_login_protocol_unselected)
...
...
@@ -322,51 +322,8 @@ class testLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginContract.Pr
iv_select_protocol.setImageResource(R.drawable.user_login_protocol_unselected)
}
}
}
//微信登录
iv_weixin
.
setOnClickListener
{
mPresenter
.
loginByThird
(
this
,
SHARE_MEDIA
.
WEIXIN
)
}
//QQ 登录
iv_qq
.
setOnClickListener
{
}*/
val
config
=
UMShareConfig
()
config
.
isNeedAuthOnGetUserInfo
(
true
)
UMShareAPI
.
get
(
this
).
setShareConfig
(
config
)
mPresenter
.
loginByThird
(
this
,
SHARE_MEDIA
.
QQ
)
}
ll_country
.
setOnClickListener
{
val
intent
=
Intent
(
this
,
CountryListActivity
::
class
.
java
)
intent
.
putExtra
(
"userCountryCode"
,
countryCode
)
startActivityForResult
(
intent
,
REQUEST_CODE_COUNTRY
)
overridePendingTransition
(
R
.
anim
.
platform_slide_in_from_bottom
,
R
.
anim
.
user_slide_null
)
}
//下一步
iv_next
.
setOnClickListener
{
if
(
iv_select_protocol
.
visibility
==
View
.
VISIBLE
&&
!
isAgreeProtocol
)
{
ToastUtil
.
toastShort
(
"请您先同意壹点灵《用户使用协议》、《隐私保护政策》,才能登录使用"
)
return
@setOnClickListener
}
if
(
checkPhone
())
{
mPresenter
.
checkPhoneStatus
(
userPhoneNumber
!!
,
countryCode
!!
,
isUmengLoginState
)
}
}
//手机号输入框
et_phone_number
.
setListener
{
if
(
TextUtils
.
isEmpty
(
it
))
{
setHint
()
iv_del
.
visibility
=
View
.
INVISIBLE
iv_del
.
isEnabled
=
false
}
else
{
iv_del
.
visibility
=
View
.
VISIBLE
iv_del
.
isEnabled
=
true
}
}
//删除按钮
iv_del
.
setOnClickListener
{
et_phone_number
.
setText
(
""
)
}
}
/**
...
...
m-user/src/main/java/com/yidianling/user/widget/PinField/SquarePinField.kt
View file @
2b292d02
...
...
@@ -19,6 +19,10 @@ import com.yidianling.user.R
* Created by poovam-5255 on 5/23/2018.
*
* Pin field represented with squares
*
* 光标距离上下的距离目前手动改cursorY1和cursorY2后期可以改成自定义
* 需要延迟大概300ms弹出键盘才能主动获取焦点
*
*/
class
SquarePinField
:
PinField
{
...
...
@@ -89,7 +93,11 @@ class SquarePinField : PinField{
val
cursorPadding
=
cursorPadding
+
highLightThickness
val
cursorY1
=
paddedY1
+
cursorPadding
val
cursorY2
=
paddedY2
-
cursorPadding
drawCursor
(
canvas
,
textX
,
cursorY1
,
cursorY2
,
highlightPaint
)
/*
* 绘制光标cursorY1是光标上方,cursorY2是光标下方
*
* */
drawCursor
(
canvas
,
textX
,
cursorY1
+
20f
,
cursorY2
-
20f
,
highlightPaint
)
}
}
highlightLogic
(
i
,
text
?.
length
){
...
...
m-user/src/main/res/layout/user_activity_verfication_code_new.xml
View file @
2b292d02
...
...
@@ -52,6 +52,7 @@
app:User_highlightType=
"currentField"
app:User_isCursorEnabled=
"true"
android:layout_width=
"0dp"
android:textSize=
"20sp"
android:layout_height=
"wrap_content"
app:layout_constraintTop_toBottomOf=
"@id/tv_phone"
app:layout_constraintStart_toStartOf=
"parent"
...
...
@@ -62,6 +63,7 @@
app:user_cornerRadius=
"8dp"
app:User_noOfFields=
"4"
android:inputType=
"number"
android:focusable=
"true"
>
</com.yidianling.user.widget.PinField.SquarePinField>
...
...
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