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
26956085
Commit
26956085
authored
Dec 24, 2020
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:自定义验证码修改大小
parent
92165f37
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
24 deletions
+38
-24
AndroidManifest.xml
m-user/src/main/AndroidManifest.xml
+4
-5
RegisterAndLoginActivity.kt
m-user/src/main/java/com/yidianling/user/ui/login/RegisterAndLoginActivity.kt
+12
-10
SquarePinField.kt
m-user/src/main/java/com/yidianling/user/widget/PinField/SquarePinField.kt
+3
-3
user_activity_verfication_code_new.xml
m-user/src/main/res/layout/user_activity_verfication_code_new.xml
+19
-6
No files found.
m-user/src/main/AndroidManifest.xml
View file @
26956085
...
...
@@ -24,16 +24,15 @@
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"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.login.testLoginActivity"
android:theme=
"@style/platform_NoTitleTheme"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".safePrivate.CheckPasswordActivity"
android:theme=
"@style/platform_NoTitleTheme"
android:screenOrientation=
"portrait"
/>
...
...
m-user/src/main/java/com/yidianling/user/ui/login/RegisterAndLoginActivity.kt
View file @
26956085
...
...
@@ -38,10 +38,7 @@ import com.ydl.ydlcommon.view.dialog.CommonDialog
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.RxKeyboardTool
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.user.LoginUtils
import
com.yidianling.user.R
import
com.yidianling.user.StatusUtils
import
com.yidianling.user.UserHelper
import
com.yidianling.user.*
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.bean.AliAuthBean
import
com.yidianling.user.constants.UserBIConstants
...
...
@@ -454,13 +451,18 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
}
//下一步
iv_next
.
setOnClickListener
{
if
(
iv_select_protocol
.
visibility
==
View
.
VISIBLE
&&
!
isAgreeProtocol
)
{
ToastUtil
.
toastShort
(
"请您先同意壹点灵《用户使用协议》、《隐私保护政策》,才能登录使用"
)
return
@setOnClickListener
}
if
(
checkPhone
())
{
mPresenter
.
checkPhoneStatus
(
userPhoneNumber
!!
,
countryCode
!!
,
isUmengLoginState
)
if
(
BuildConfig
.
DEBUG
){
testLoginActivity
.
start
(
this
)
}
else
{
if
(
iv_select_protocol
.
visibility
==
View
.
VISIBLE
&&
!
isAgreeProtocol
)
{
ToastUtil
.
toastShort
(
"请您先同意壹点灵《用户使用协议》、《隐私保护政策》,才能登录使用"
)
return
@setOnClickListener
}
if
(
checkPhone
())
{
mPresenter
.
checkPhoneStatus
(
userPhoneNumber
!!
,
countryCode
!!
,
isUmengLoginState
)
}
}
}
//手机号输入框
et_phone_number
.
setListener
{
...
...
m-user/src/main/java/com/yidianling/user/widget/PinField/SquarePinField.kt
View file @
26956085
...
...
@@ -81,7 +81,7 @@ class SquarePinField : PinField{
*
* */
if
(
character
!=
null
)
{
canvas
?.
drawText
(
character
.
toString
(),
textX
,
textY
,
textPaint
)
canvas
?.
drawText
(
character
.
toString
(),
textX
+
10
,
textY
,
textPaint
)
}
if
(
shouldDrawHint
()){
...
...
@@ -100,7 +100,7 @@ class SquarePinField : PinField{
* 绘制光标cursorY1是光标上方,cursorY2是光标下方
*
* */
drawCursor
(
canvas
,
textX
,
cursorY1
+
20f
,
cursorY2
-
2
0f
,
highlightPaint
)
drawCursor
(
canvas
,
textX
+
10
,
cursorY1
+
20f
,
cursorY2
-
3
0f
,
highlightPaint
)
}
}
highlightLogic
(
i
,
text
?.
length
){
...
...
@@ -111,7 +111,7 @@ class SquarePinField : PinField{
private
fun
drawRect
(
canvas
:
Canvas
?,
paddedX1
:
Float
,
paddedY1
:
Float
,
paddedX2
:
Float
,
paddedY2
:
Float
,
paint
:
Paint
){
if
(
cornerRadius
>
0
&&
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
){
canvas
?.
drawRoundRect
(
paddedX1
,
paddedY1
,
paddedX2
,
paddedY2
,
cornerRadius
,
cornerRadius
,
paint
)
canvas
?.
drawRoundRect
(
paddedX1
,
paddedY1
-
20f
,
paddedX2
+
20f
,
paddedY2
,
cornerRadius
,
cornerRadius
,
paint
)
}
else
{
canvas
?.
drawRect
(
paddedX1
,
paddedY1
,
paddedX2
,
paddedY2
,
paint
)
}
...
...
m-user/src/main/res/layout/user_activity_verfication_code_new.xml
View file @
26956085
...
...
@@ -58,24 +58,36 @@
android:cursorVisible=
"true"
android:focusable=
"true"
android:inputType=
"number"
android:textSize=
"20sp"
android:paddingBottom=
"0dp"
android:paddingTop=
"0dp"
android:textSize=
"24sp"
app:User_highlightType=
"currentField"
app:User_isCursorEnabled=
"true"
app:User_noOfFields=
"4"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_phone"
app:user_cornerRadius=
"8dp"
/>
app:user_cornerRadius=
"8dp"
/>
<TextView
android:id=
"@+id/login_password"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/platform_dp_15"
android:text=
"密码登录"
android:id=
"@+id/login_password"
android:textColor=
"@color/platform_color_666666"
android:textSize=
"13sp"
app:layout_constraintStart_toStartOf=
"@id/verify_code"
app:layout_constraintTop_toBottomOf=
"@id/verify_code"
>
app:layout_constraintTop_toBottomOf=
"@id/verify_code"
/
>
</TextView>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"收不到验证码?"
android:textSize=
"13sp"
android:textColor=
"@color/platform_color_666666"
app:layout_constraintRight_toRightOf=
"@id/verify_code"
app:layout_constraintTop_toTopOf=
"@id/login_password"
app:layout_constraintBottom_toBottomOf=
"@id/login_password"
/>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
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