Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
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
android
android_vedio
Commits
7d1fd44f
Commit
7d1fd44f
authored
Oct 10, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
3ba8a5ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
13 deletions
+37
-13
VipActivity.kt
...in/java/com/duben/xixiplaylet/ui/activitys/VipActivity.kt
+37
-13
No files found.
video/app/src/main/java/com/duben/xixiplaylet/ui/activitys/VipActivity.kt
View file @
7d1fd44f
...
...
@@ -28,8 +28,13 @@ import com.duben.xixiplaylet.ui.adapter.VipBannerAdapter
import
com.duben.xixiplaylet.ui.widgets.*
import
com.duben.library.utils.GlideUtils
import
com.duben.library.utils.nodoubleclick.AntiShake
import
com.duben.xixiplaylet.ad.splash.SplashManager
import
com.duben.xixiplaylet.manager.ActivityPageManager
import
com.duben.xixiplaylet.mvp.model.*
import
com.duben.xixiplaylet.ui.widgets.countdowntimer.CountDownTimerSupport
import
com.duben.xixiplaylet.ui.widgets.countdowntimer.OnCountDownTimerListener
import
com.duben.xixiplaylet.utils.AppPreferencesManager
import
com.duben.xixiplaylet.utils.LogUtil
import
com.duben.xixiplaylet.utils.rxutil.CommonRxTask
import
com.duben.xixiplaylet.utils.rxutil.RxjavaUtil
import
com.jobo.alipay.AliPay
...
...
@@ -63,6 +68,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
const
val
THIRD_ID
=
"THIRD_ID"
const
val
VEDIO_ID
=
"VEDIO_ID"
}
var
timer
:
CountDownTimerSupport
?
=
null
private
var
breathAnim
:
YoYo
.
YoYoString
?
=
null
private
var
payAgreementDialog
:
PayAgreementDialog
?
=
null
...
...
@@ -127,19 +133,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
if
(
AppConfig
.
enterAlipay
)
{
AppConfig
.
enterAlipay
=
false
showLoading
(
"查询支付结果..."
)
RxjavaUtil
.
executeRxTask
(
object
:
CommonRxTask
<
String
>(
""
)
{
override
fun
doInIOThread
()
{
Thread
.
sleep
(
8000
)
}
override
fun
doInUIThread
()
{
if
(
this
@VipActivity
.
isFinishing
)
{
return
}
hideLoading
()
vipPresenter
.
getMyInfo
()
}
})
startTimer
()
}
}
...
...
@@ -149,6 +143,12 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
AppConfig
.
enterVipAct
=
false
}
breathAnim
?.
stop
()
if
(
timer
!=
null
)
{
//防止计时器重复
timer
!!
.
stop
()
timer
=
null
}
vipPresenter
.
detachView
()
}
...
...
@@ -751,4 +751,28 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
})
.
show
()
}
fun
startTimer
()
{
if
(
timer
!=
null
)
{
//防止计时器重复
timer
!!
.
stop
()
timer
=
null
}
timer
=
CountDownTimerSupport
(
8000
,
1000
)
timer
!!
.
setOnCountDownTimerListener
(
object
:
OnCountDownTimerListener
{
override
fun
onTick
(
millisUntilFinished
:
Long
)
{
if
(!
isFinishing
)
{
if
(
millisUntilFinished
==
3000L
){
vipPresenter
.
getMyInfo
()
}
}
}
override
fun
onFinish
()
{
if
(!
isFinishing
)
{
vipPresenter
.
getMyInfo
()
}
}
})
timer
!!
.
start
()
}
}
\ 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