Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
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
bp
ShenghuoquanBusiness
Commits
06bb5456
Commit
06bb5456
authored
May 18, 2021
by
宋永孟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 优化页面
parent
92c2e619
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
33 deletions
+96
-33
LoginLifeCircleActivity.kt
...an/shenghuoquan/newscontent/ui/LoginLifeCircleActivity.kt
+2
-2
CountDownTimerUtils.kt
...ian/shenghuoquan/newscontent/utils/CountDownTimerUtils.kt
+6
-2
activity_login.xml
...onents/newscontent/src/main/res/layout/activity_login.xml
+88
-29
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/LoginLifeCircleActivity.kt
View file @
06bb5456
...
...
@@ -9,7 +9,7 @@ import com.yidian.shenghuoquan.newscontent.utils.CountDownTimerUtils
/**
* Author: sym
* Date: 2021/5/18 5:14 PM
* Describe:
* Describe:
短信登陆页面
*/
class
LoginLifeCircleActivity
:
BaseActivity
<
ActivityLoginBinding
>()
{
private
lateinit
var
mCountDownTimerUtils
:
CountDownTimerUtils
...
...
@@ -29,7 +29,7 @@ class LoginLifeCircleActivity : BaseActivity<ActivityLoginBinding>() {
}
private
fun
initView
()
{
mCountDownTimerUtils
=
CountDownTimerUtils
(
viewBind
.
getBtn
,
6000
,
1000
)
mCountDownTimerUtils
=
CountDownTimerUtils
(
viewBind
.
getBtn
,
6000
0
,
1000
)
}
private
fun
setOnListener
()
{
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/utils/CountDownTimerUtils.kt
View file @
06bb5456
...
...
@@ -18,11 +18,15 @@ class CountDownTimerUtils : CountDownTimer {
override
fun
onTick
(
millisUntilFinished
:
Long
)
{
mTextView
!!
.
isClickable
=
false
//设置不可点击
var
temp
:
Long
=
millisUntilFinished
/
1000
mTextView
!!
.
text
=
temp
.
toString
()
+
"秒后可重新发送"
//设置倒计时时间
if
(
temp
.
toString
()
!=
"0"
)
{
mTextView
!!
.
text
=
temp
.
toString
()
+
"s后重新获取"
//设置倒计时时间
}
else
{
mTextView
!!
.
text
=
"获取验证码"
}
}
override
fun
onFinish
()
{
mTextView
!!
.
text
=
"
重新
获取验证码"
mTextView
!!
.
text
=
"获取验证码"
mTextView
!!
.
isClickable
=
true
//重新获得点击
}
}
\ No newline at end of file
Components/newscontent/src/main/res/layout/activity_login.xml
View file @
06bb5456
<?xml version="1.0" encoding="utf-8"?>
<
Relative
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Linear
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<EditText
android:id=
"@+id/phone_number_edit"
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"141dp"
android:layout_marginStart=
"40dp"
android:ems=
"10"
android:hint=
"请输入手机号"
>
<requestFocus
/>
</EditText>
android:layout_gravity=
"center"
android:layout_marginTop=
"130dp"
android:text=
"加入生活圈升级为生活号"
/>
<EditText
android:id=
"@+id/number_edit"
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/phone_number_edit"
android:layout_marginTop=
"26dp"
android:layout_marginStart=
"40dp"
android:ems=
"10"
android:hint=
"请输入验证码"
/>
android:layout_gravity=
"center"
android:layout_marginTop=
"30dp"
android:text=
"为你提供更多更优的服务"
android:textSize=
"24sp"
/>
<TextView
android:id=
"@+id/get_btn"
android:layout_width=
"wrap_content"
<LinearLayout
android:layout_width=
"260dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginTop=
"60dp"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"手机号"
android:textSize=
"18sp"
/>
<EditText
android:id=
"@+id/phone_number_edit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"40dp"
android:background=
"@null"
android:text=
"13888888888"
android:textColor=
"#555555"
android:textSize=
"18sp"
></EditText>
</LinearLayout>
<View
android:layout_width=
"260dp"
android:layout_height=
"1dp"
android:layout_gravity=
"center"
android:layout_marginTop=
"15dp"
android:background=
"#989998"
/>
<LinearLayout
android:layout_width=
"260dp"
android:layout_height=
"wrap_content"
android:layout_alignBottom=
"@+id/number_edit"
android:layout_alignParentRight=
"true"
android:text=
"获取验证码"
/>
android:layout_gravity=
"center"
android:layout_marginTop=
"60dp"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"验证码"
android:textSize=
"18sp"
/>
<EditText
android:id=
"@+id/number_edit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"40dp"
android:background=
"@null"
android:text=
"3f9k"
android:textColor=
"#555555"
android:textSize=
"18sp"
/>
<View
android:layout_width=
"0dp"
android:layout_height=
"1dp"
android:layout_weight=
"1"
/>
<TextView
android:id=
"@+id/get_btn"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"获取验证码"
/>
</LinearLayout>
<View
android:layout_width=
"260dp"
android:layout_height=
"1dp"
android:layout_gravity=
"center"
android:layout_marginTop=
"15dp"
android:background=
"#989998"
/>
<Button
android:id=
"@+id/login_btn"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
200dp
"
android:layout_height=
"wrap_content"
android:layout_
centerHorizontal=
"true
"
android:layout_
centerVertical=
"true
"
android:text=
"登
陆
"
/>
android:layout_
marginTop=
"50dp
"
android:layout_
gravity=
"center
"
android:text=
"登
录
"
/>
</RelativeLayout>
\ No newline at end of file
</LinearLayout>
\ 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