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
643ac9ac
Commit
643ac9ac
authored
Oct 07, 2023
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
8c4bb2a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
12 deletions
+67
-12
DrawProgressActivity.kt
...om/duben/miniplaylet/ui/activitys/DrawProgressActivity.kt
+52
-11
DrawCashFragment.kt
...om/duben/miniplaylet/ui/fragment/draw/DrawCashFragment.kt
+15
-1
No files found.
video/app/src/main/java/com/duben/miniplaylet/ui/activitys/DrawProgressActivity.kt
View file @
643ac9ac
...
@@ -27,6 +27,7 @@ class DrawProgressActivity : BaseActivity(), View.OnClickListener {
...
@@ -27,6 +27,7 @@ class DrawProgressActivity : BaseActivity(), View.OnClickListener {
private
var
progress
=
0
private
var
progress
=
0
private
var
max
=
0
private
var
max
=
0
private
var
tempAdProgress
=
0
private
var
tempAdProgress
=
0
private
var
showProgress
=
0
private
var
carrierType
=
""
private
var
carrierType
=
""
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_draw_progress
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_draw_progress
...
@@ -49,9 +50,7 @@ class DrawProgressActivity : BaseActivity(), View.OnClickListener {
...
@@ -49,9 +50,7 @@ class DrawProgressActivity : BaseActivity(), View.OnClickListener {
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
if
(
tempAdProgress
>=
max
)
{
finish
()
}
}
}
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
...
@@ -63,12 +62,27 @@ class DrawProgressActivity : BaseActivity(), View.OnClickListener {
...
@@ -63,12 +62,27 @@ class DrawProgressActivity : BaseActivity(), View.OnClickListener {
.
setForegroundColor
(
context
.
resources
.
getColor
(
R
.
color
.
color_F44E0D
))
.
setForegroundColor
(
context
.
resources
.
getColor
(
R
.
color
.
color_F44E0D
))
.
create
()
.
create
()
tv_draw_progress_title
.
text
=
SpanUtils
()
showProgress
=
progress
.
append
(
"还有任务"
)
.
setForegroundColor
(
context
.
resources
.
getColor
(
R
.
color
.
black
))
if
(
showProgress
>=
max
)
{
.
append
(
"未完成"
)
tv_draw_progress_ad
.
text
=
"去提现"
.
setForegroundColor
(
context
.
resources
.
getColor
(
R
.
color
.
color_F44E0D
))
tv_draw_progress_title
.
text
=
SpanUtils
()
.
create
()
.
append
(
"任务"
)
.
setForegroundColor
(
context
.
resources
.
getColor
(
R
.
color
.
black
))
.
append
(
"已完成"
)
.
setForegroundColor
(
context
.
resources
.
getColor
(
R
.
color
.
color_F44E0D
))
.
create
()
}
else
{
tv_draw_progress_ad
.
text
=
"去完成"
tv_draw_progress_title
.
text
=
SpanUtils
()
.
append
(
"还有任务"
)
.
setForegroundColor
(
context
.
resources
.
getColor
(
R
.
color
.
black
))
.
append
(
"未完成"
)
.
setForegroundColor
(
context
.
resources
.
getColor
(
R
.
color
.
color_F44E0D
))
.
create
()
}
pb_draw_progress
.
progress
=
progress
pb_draw_progress
.
progress
=
progress
pb_draw_progress
.
max
=
max
pb_draw_progress
.
max
=
max
initListener
()
initListener
()
...
@@ -104,7 +118,13 @@ class DrawProgressActivity : BaseActivity(), View.OnClickListener {
...
@@ -104,7 +118,13 @@ class DrawProgressActivity : BaseActivity(), View.OnClickListener {
finish
()
finish
()
}
}
R
.
id
.
tv_draw_progress_ad
->
{
R
.
id
.
tv_draw_progress_ad
->
{
showAd
(
carrierType
)
if
(
showProgress
>=
max
)
{
finish
()
}
else
{
showAd
(
carrierType
)
}
}
}
}
}
}
}
...
@@ -157,7 +177,7 @@ class DrawProgressActivity : BaseActivity(), View.OnClickListener {
...
@@ -157,7 +177,7 @@ class DrawProgressActivity : BaseActivity(), View.OnClickListener {
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(
isFinishing
)
return
@postDelayed
if
(
isFinishing
)
return
@postDelayed
val
showProgress
=
progress
+
tempAdProgress
showProgress
=
progress
+
tempAdProgress
pb_draw_progress
.
progress
=
showProgress
pb_draw_progress
.
progress
=
showProgress
pb_draw_progress
.
max
=
max
pb_draw_progress
.
max
=
max
...
@@ -168,6 +188,27 @@ class DrawProgressActivity : BaseActivity(), View.OnClickListener {
...
@@ -168,6 +188,27 @@ class DrawProgressActivity : BaseActivity(), View.OnClickListener {
.
append
(
"/${max}"
)
.
append
(
"/${max}"
)
.
setForegroundColor
(
context
.
resources
.
getColor
(
R
.
color
.
color_F44E0D
))
.
setForegroundColor
(
context
.
resources
.
getColor
(
R
.
color
.
color_F44E0D
))
.
create
()
.
create
()
if
(
showProgress
>=
max
)
{
tv_draw_progress_ad
.
text
=
"去提现"
tv_draw_progress_title
.
text
=
SpanUtils
()
.
append
(
"任务"
)
.
setForegroundColor
(
context
.
resources
.
getColor
(
R
.
color
.
black
))
.
append
(
"已完成"
)
.
setForegroundColor
(
context
.
resources
.
getColor
(
R
.
color
.
color_F44E0D
))
.
create
()
}
else
{
tv_draw_progress_ad
.
text
=
"去完成"
tv_draw_progress_title
.
text
=
SpanUtils
()
.
append
(
"还有任务"
)
.
setForegroundColor
(
context
.
resources
.
getColor
(
R
.
color
.
black
))
.
append
(
"未完成"
)
.
setForegroundColor
(
context
.
resources
.
getColor
(
R
.
color
.
color_F44E0D
))
.
create
()
}
},
300
)
},
300
)
}
}
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/miniplaylet/ui/fragment/draw/DrawCashFragment.kt
View file @
643ac9ac
...
@@ -220,6 +220,12 @@ class DrawCashFragment : LazyLoadBaseFragment(), DrawCashView, DrawCashAdapter.O
...
@@ -220,6 +220,12 @@ class DrawCashFragment : LazyLoadBaseFragment(), DrawCashView, DrawCashAdapter.O
//发起提现
//发起提现
TrackManager
.
getInstance
().
addCashoutReq
(
currentDrawInfo
?.
unitId
)
TrackManager
.
getInstance
().
addCashoutReq
(
currentDrawInfo
?.
unitId
)
showToast
(
"发起提现成功"
)
showToast
(
"发起提现成功"
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
(
requireActivity
()
as
MainActivity
).
dismissDrawDialog
()
},
800
)
}
}
}
}
11
->
{
11
->
{
...
@@ -254,9 +260,13 @@ class DrawCashFragment : LazyLoadBaseFragment(), DrawCashView, DrawCashAdapter.O
...
@@ -254,9 +260,13 @@ class DrawCashFragment : LazyLoadBaseFragment(), DrawCashView, DrawCashAdapter.O
)
)
}
}
bundle
.
putInt
(
DrawProgressActivity
.
PROGRESS
,
it
.
taskNeedComplete
)
bundle
.
putInt
(
DrawProgressActivity
.
PROGRESS
,
it
.
taskNeedComplete
)
bundle
.
putInt
(
DrawProgressActivity
.
MAX
,
it
.
taskComplete
)
// bundle.putInt(DrawProgressActivity.MAX, it.taskComplete)
bundle
.
putInt
(
DrawProgressActivity
.
MAX
,
4
)
readyGo
(
DrawProgressActivity
::
class
.
java
,
bundle
)
readyGo
(
DrawProgressActivity
::
class
.
java
,
bundle
)
}
}
else
->
{
}
}
}
}
}
...
@@ -313,6 +323,10 @@ class DrawCashFragment : LazyLoadBaseFragment(), DrawCashView, DrawCashAdapter.O
...
@@ -313,6 +323,10 @@ class DrawCashFragment : LazyLoadBaseFragment(), DrawCashView, DrawCashAdapter.O
if
(!
isAdded
)
return
@postDelayed
if
(!
isAdded
)
return
@postDelayed
showToast
(
"发起提现成功"
)
showToast
(
"发起提现成功"
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
(
requireActivity
()
as
MainActivity
).
dismissDrawDialog
()
},
800
)
},
1000
)
},
1000
)
}
}
Constant
.
CARRIERTYPE_REWARD_COIN
->
{
Constant
.
CARRIERTYPE_REWARD_COIN
->
{
...
...
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