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
92165f37
Commit
92165f37
authored
Dec 23, 2020
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:修改自定义验证码UIwidget
parent
2b292d02
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
32 deletions
+47
-32
SquarePinField.kt
m-user/src/main/java/com/yidianling/user/widget/PinField/SquarePinField.kt
+4
-1
user_activity_verfication_code_new.xml
m-user/src/main/res/layout/user_activity_verfication_code_new.xml
+43
-31
No files found.
m-user/src/main/java/com/yidianling/user/widget/PinField/SquarePinField.kt
View file @
92165f37
...
...
@@ -76,7 +76,10 @@ class SquarePinField : PinField{
}
else
{
drawRect
(
canvas
,
paddedX1
,
paddedY1
,
paddedX2
,
paddedY2
,
fieldPaint
)
}
/*
* 绘制文字的位置
*
* */
if
(
character
!=
null
)
{
canvas
?.
drawText
(
character
.
toString
(),
textX
,
textY
,
textPaint
)
}
...
...
m-user/src/main/res/layout/user_activity_verfication_code_new.xml
View file @
92165f37
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
>
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<ImageView
android:id=
"@+id/img_reg_back"
android:layout_width=
"wrap_content"
...
...
@@ -12,8 +13,8 @@
android:layout_marginTop=
"@dimen/platform_dp_20"
android:src=
"@drawable/user_ic_back_black"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_login_title"
android:layout_width=
"wrap_content"
...
...
@@ -24,47 +25,57 @@
android:textSize=
"22sp"
app:layout_constraintLeft_toRightOf=
"@id/img_reg_back"
app:layout_constraintTop_toBottomOf=
"@id/img_reg_back"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content
"
android:text=
"已发送至+86 137 7759 3333
"
app:layout_constraintTop_toBottomOf=
"@id/tv_login_title
"
android:layout_marginTop=
"@dimen/platform_dp_5"
app:layout_constraintStart_toStartOf=
"@id/tv_login_title
"
android:id=
"@+id/tv_phon
e"
>
</TextView>
<TextView
android:id=
"@+id/tv_phone
"
android:layout_width=
"wrap_content
"
android:layout_height=
"wrap_content
"
android:layout_marginTop=
"@dimen/platform_dp_5"
android:text=
"已发送至+86 137 7759 3333
"
app:layout_constraintStart_toStartOf=
"@id/tv_login_titl
e"
app:layout_constraintTop_toBottomOf=
"@id/tv_login_title"
/
>
<TextView
android:id=
"@+id/tv_countdown_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/platform_dp_40"
android:textColor=
"@color/pay_color_999999"
android:textSize=
"13sp"
app:layout_constraintBottom_toBottomOf=
"@id/tv_phone"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/tv_phone"
app:layout_constraintBottom_toBottomOf=
"@id/tv_phone"
android:layout_marginEnd=
"@dimen/platform_dp_40"
android:textSize=
"13sp"
tools:text=
"发送验证码"
tools:visibility=
"visible"
/>
<com.yidianling.user.widget.PinField.SquarePinField
android:id=
"@+id/verify_code"
android:cursorVisible=
"true"
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"
app:layout_constraintEnd_toEndOf=
"parent"
android:layout_marginStart=
"@dimen/platform_dp_40"
android:layout_marginEnd=
"@dimen/platform_dp_40"
android:layout_marginTop=
"67dp"
app:user_cornerRadius=
"8dp"
app:User_noOfFields=
"4"
android:inputType=
"number"
android:layout_marginEnd=
"@dimen/platform_dp_40"
android:cursorVisible=
"true"
android:focusable=
"true"
>
</com.yidianling.user.widget.PinField.SquarePinField>
android:inputType=
"number"
android:textSize=
"20sp"
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"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/platform_dp_15"
android:text=
"密码登录"
android:id=
"@+id/login_password"
app:layout_constraintStart_toStartOf=
"@id/verify_code"
app:layout_constraintTop_toBottomOf=
"@id/verify_code"
>
</TextView>
</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