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
ec43d9df
Commit
ec43d9df
authored
Sep 28, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
20fcae0a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
85 additions
and
5 deletions
+85
-5
MainFragment.kt
...ain/java/com/duben/dayplaylet/ui/fragment/MainFragment.kt
+44
-0
MusicFragment.kt
...in/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
+21
-0
MyFragment.kt
.../main/java/com/duben/dayplaylet/ui/fragment/MyFragment.kt
+2
-0
RedpkgFragment.kt
...n/java/com/duben/dayplaylet/ui/fragment/RedpkgFragment.kt
+4
-0
DrawCashFragment.kt
...com/duben/dayplaylet/ui/fragment/draw/DrawCashFragment.kt
+3
-5
DramaApiDetailActivity.kt
.../com/duben/dayplaylet/video/csj/DramaApiDetailActivity.kt
+11
-0
No files found.
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MainFragment.kt
View file @
ec43d9df
...
...
@@ -130,6 +130,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
if
(
AppConfig
.
mainShowHalfAd
)
{
AppConfig
.
mainShowHalfAd
=
false
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
HalfScreenManager
.
getInstance
().
showAd
(
requireActivity
(),
null
)
},
200
)
}
...
...
@@ -182,21 +184,33 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
Constant
.
CARRIERTYPE_REWARD_FIRST
->
{
val
tempCoin
=
userInfo
?.
rewardCoin
?:
0
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
tv_cash
.
text
=
"18.88元"
ConsumerToastUtil
.
showAwardText
(
requireContext
(),
tempCoin
,
0
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
addAnimation
(
iv_main_tempanim
,
iv_cash
,
R
.
mipmap
.
ic_redpkg
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
addAnimation
(
iv_main_tempanim
,
iv_cash
,
R
.
mipmap
.
ic_redpkg
)
},
100
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
addAnimation
(
iv_main_tempanim
,
iv_cash
,
R
.
mipmap
.
ic_redpkg
)
},
200
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
addAnimation
(
iv_main_tempanim
,
iv_cash
,
R
.
mipmap
.
ic_redpkg
)
},
300
)
},
1400
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
tv_cash
.
text
=
"18.88元"
showSignDialog
()
},
2000
)
...
...
@@ -204,13 +218,19 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
Constant
.
CARRIERTYPE_SIGN
->
{
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
// 1、第一次打款
showDrawAlipayDialog
(
signMsg
?.
cashCashFirst
?:
0.01
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
// 2、展示签到余额
drawAlipayDialog
?.
dismiss
()
showSignDrawDialog
(
0
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
// 3、发放奖励弹窗
if
(!
isSignDrawFlag
)
{
signDrawDialog
?.
dismiss
()
...
...
@@ -218,6 +238,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
bundle
.
putString
(
LoadingActivity
.
TEXT
,
"正在为您发放奖励.."
)
readyGo
(
LoadingActivity
::
class
.
java
,
bundle
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
showAd
(
Constant
.
CARRIERTYPE_SIGN_DRAW
)
},
2500
)
}
...
...
@@ -228,8 +250,12 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
Constant
.
CARRIERTYPE_SIGN_DRAW
->
{
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
showDrawAlipayDialog
(
signMsg
?.
cashCashSecond
?:
0.01
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
// 2、第二次展示签到余额
drawAlipayDialog
?.
dismiss
()
showSignDrawDialog
(
1
)
...
...
@@ -390,6 +416,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
* 新人弹窗
*/
private
fun
showNewcomerDialog
(
rewardCoin
:
Int
)
{
if
(!
isAdded
)
return
newcomerDialog
=
NewcomerDialog
(
requireContext
(),
rewardCoin
)
newcomerDialog
?.
setAdListener
(
object
:
NewcomerDialog
.
AdListener
{
override
fun
showAd
()
{
...
...
@@ -410,6 +438,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
* 2-7天后 第一次进入.不用定时
*/
private
fun
showSignDrawDialog
(
times
:
Int
)
{
if
(!
isAdded
)
return
signDrawDialog
=
SignDrawDialog
(
requireContext
(),
times
)
signDrawDialog
?.
setAdListener
(
object
:
SignDrawDialog
.
AdListener
{
override
fun
click
()
{
...
...
@@ -421,6 +451,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
bundle
.
putString
(
LoadingActivity
.
TEXT
,
"正在为您发放奖励.."
)
readyGo
(
LoadingActivity
::
class
.
java
,
bundle
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
showAd
(
Constant
.
CARRIERTYPE_SIGN_DRAW
)
},
2500
)
}
else
if
(
times
==
1
)
{
...
...
@@ -432,6 +464,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
bundle
.
putString
(
LoadingActivity
.
TEXT
,
"正在为您发放奖励.."
)
readyGo
(
LoadingActivity
::
class
.
java
,
bundle
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
showAd
(
Constant
.
CARRIERTYPE_SIGN_7
)
},
2500
)
}
...
...
@@ -451,6 +485,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
private
fun
showDrawAlipayDialog
(
cash
:
Double
)
{
TrackManager
.
getInstance
().
addCashoutReq
(
signMsg
?.
unitId
)
if
(!
isAdded
)
return
drawAlipayDialog
=
DrawAlipayDialog
(
requireContext
(),
cash
)
drawAlipayDialog
!!
.
show
()
}
...
...
@@ -499,6 +535,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
private
fun
showSignDialog
()
{
if
(
signMsg
==
null
)
return
if
(!
isAdded
)
return
DialogUtils
.
showSignDialog
(
requireContext
(),
object
:
DialogListener
()
{
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
)
{
...
...
@@ -523,6 +561,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
showToast
(
"支付宝授权成功"
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
dialog
?.
dismiss
()
val
bundle
=
Bundle
()
if
(
signMsg
!=
null
)
{
...
...
@@ -536,6 +576,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
readyGo
(
LoadingActivity
::
class
.
java
,
bundle
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
showAd
(
Constant
.
CARRIERTYPE_SIGN
)
},
2500
)
},
500
)
...
...
@@ -557,6 +599,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
readyGo
(
LoadingActivity
::
class
.
java
,
bundle
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
showAd
(
Constant
.
CARRIERTYPE_SIGN
)
},
2500
)
}
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
View file @
ec43d9df
...
...
@@ -124,6 +124,8 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
if
(
AppConfig
.
mainMusicRefresh
)
{
AppConfig
.
mainMusicRefresh
=
false
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
musicPresenter
.
rdSongMsg
()
},
1500
)
}
...
...
@@ -243,6 +245,8 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
finger
.
visibility
=
View
.
GONE
mainHandler
.
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
// 点击过后不展示
if
(!
rlOption0
.
isClickable
)
return
@postDelayed
...
...
@@ -330,6 +334,8 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
}
mainHandler
.
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
quizIv
.
visibility
=
View
.
GONE
},
1000
)
...
...
@@ -575,6 +581,8 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
if
(!
isNineFlag
)
{
isNineFlag
=
true
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
val
bundle
=
Bundle
()
bundle
.
putString
(
NineActivity
.
DRAW_ID
,
it
.
unitId
)
bundle
.
putString
(
NineActivity
.
CASH
,
it
.
cash
)
...
...
@@ -629,17 +637,23 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
}
else
{
tv_cash_reward
.
text
=
"+$cashReward"
mainHandler
.
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
addAnimation
(
iv_cash_reward
,
iv_cash
)
mainHandler
.
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
addAnimation
(
iv_cash_reward
,
iv_cash
)
},
200
)
mainHandler
.
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
addAnimation
(
iv_cash_reward
,
iv_cash
)
},
400
)
mainHandler
.
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
addAnimation
(
iv_cash_reward
,
iv_cash
)
},
800
)
mainHandler
.
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
rope
=
null
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
300
).
playOn
(
rl_cash
)
},
1000
)
...
...
@@ -652,18 +666,23 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
}
else
{
tv_gold_reward
.
text
=
"+$goldReward"
mainHandler
.
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
addAnimation
(
iv_gold_reward
,
iv_gold
)
mainHandler
.
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
addAnimation
(
iv_gold_reward
,
iv_gold
)
},
200
)
mainHandler
.
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
addAnimation
(
iv_gold_reward
,
iv_gold
)
},
400
)
mainHandler
.
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
addAnimation
(
iv_gold_reward
,
iv_gold
)
},
800
)
mainHandler
.
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
rope
=
null
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
300
).
playOn
(
rl_gold
)
},
1000
)
...
...
@@ -671,6 +690,7 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
}
mainHandler
.
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
cl_reward
.
visibility
=
View
.
GONE
},
1500
)
}
...
...
@@ -787,6 +807,7 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
})
mTimer
?.
start
()
mainHandler
.
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
rope
=
null
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
1000
).
repeat
(-
1
)
.
playOn
(
quizLLPop
)
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MyFragment.kt
View file @
ec43d9df
...
...
@@ -277,6 +277,8 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
when
(
carrierType
)
{
Constant
.
CARRIERTYPE_TASK_YUANBAO
->
{
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
ConsumerToastUtil
.
showAwardText
(
requireContext
(),
0
,
AppConfig
.
awardYuanbao
)
myPresenter
.
rdUserHallList
()
},
800
)
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/RedpkgFragment.kt
View file @
ec43d9df
...
...
@@ -185,6 +185,8 @@ class RedpkgFragment : LazyLoadBaseFragment(), View.OnClickListener, RedpkgView
(
activity
as
MainActivity
).
hideKeyboard
()
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
val
msg
=
MsgBean
(
1
,
false
,
"游客"
,
inputStr
)
val
msgMultiItemEntity
=
MSGMultiItemEntity
(
msg
.
type
,
msg
)
mMsgAdapter
?.
addData
(
msgMultiItemEntity
)
...
...
@@ -323,6 +325,8 @@ class RedpkgFragment : LazyLoadBaseFragment(), View.OnClickListener, RedpkgView
bundle
.
putString
(
LoadingActivity
.
TEXT
,
"正在为您发放奖励.."
)
readyGo
(
LoadingActivity
::
class
.
java
,
bundle
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isAdded
)
return
@postDelayed
if
(!
isCash
)
{
awardVideo
(
Constant
.
CARRIERTYPE_REWARD_HONGBAO
,
cash
)
}
else
{
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/draw/DrawCashFragment.kt
View file @
ec43d9df
...
...
@@ -8,8 +8,6 @@ import android.view.View
import
android.widget.RadioGroup
import
androidx.fragment.app.Fragment
import
androidx.recyclerview.widget.GridLayoutManager
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
com.duben.dayplaylet.R
import
com.duben.dayplaylet.ad.AdManager
import
com.duben.dayplaylet.ad.AdStatusListener
...
...
@@ -23,11 +21,11 @@ import com.duben.dayplaylet.mvp.presenters.DrawCashPresenter
import
com.duben.dayplaylet.mvp.views.DrawCashView
import
com.duben.dayplaylet.ui.activitys.DrawProgressActivity
import
com.duben.dayplaylet.ui.activitys.MainActivity
import
com.duben.dayplaylet.ui.fragment.MyFragment
import
com.duben.dayplaylet.ui.fragment.base.LazyLoadBaseFragment
import
com.duben.dayplaylet.utils.*
import
com.duben.dayplaylet.utils.ConsumerToastUtil
import
com.duben.dayplaylet.utils.SpanUtils
import
com.duben.dayplaylet.utils.ToastUtil
import
com.duben.library.utils.nodoubleclick.AntiShake
import
kotlinx.android.synthetic.main.activity_feekback.*
import
kotlinx.android.synthetic.main.fragment_draw.*
/**
...
...
video/app/src/main/java/com/duben/dayplaylet/video/csj/DramaApiDetailActivity.kt
View file @
ec43d9df
...
...
@@ -680,18 +680,23 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
}
else
{
tv_cash_reward
.
text
=
"+$cashReward"
mainHandler
.
postDelayed
({
if
(
isFinishing
)
return
@postDelayed
addAnimation
(
iv_cash_reward
,
iv_cash
)
mainHandler
.
postDelayed
({
if
(
isFinishing
)
return
@postDelayed
addAnimation
(
iv_cash_reward
,
iv_cash
)
},
200
)
mainHandler
.
postDelayed
({
if
(
isFinishing
)
return
@postDelayed
addAnimation
(
iv_cash_reward
,
iv_cash
)
},
400
)
mainHandler
.
postDelayed
({
if
(
isFinishing
)
return
@postDelayed
addAnimation
(
iv_cash_reward
,
iv_cash
)
},
800
)
},
100
)
mainHandler
.
postDelayed
({
if
(
isFinishing
)
return
@postDelayed
rope
=
null
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
300
).
playOn
(
rl_cash
)
},
1000
)
...
...
@@ -704,18 +709,23 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
}
else
{
tv_gold_reward
.
text
=
"+$goldReward"
mainHandler
.
postDelayed
({
if
(
isFinishing
)
return
@postDelayed
addAnimation
(
iv_gold_reward
,
iv_gold
)
mainHandler
.
postDelayed
({
if
(
isFinishing
)
return
@postDelayed
addAnimation
(
iv_gold_reward
,
iv_gold
)
},
200
)
mainHandler
.
postDelayed
({
if
(
isFinishing
)
return
@postDelayed
addAnimation
(
iv_gold_reward
,
iv_gold
)
},
400
)
mainHandler
.
postDelayed
({
if
(
isFinishing
)
return
@postDelayed
addAnimation
(
iv_gold_reward
,
iv_gold
)
},
800
)
},
100
)
mainHandler
.
postDelayed
({
if
(
isFinishing
)
return
@postDelayed
rope
=
null
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
300
).
playOn
(
rl_gold
)
},
1000
)
...
...
@@ -723,6 +733,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
// HalfScreenManager.getInstance().preLoadAd(this)
mainHandler
.
postDelayed
({
if
(
isFinishing
)
return
@postDelayed
cl_reward
.
visibility
=
View
.
GONE
// 展示插屏
// HalfScreenManager.getInstance().showAd(this, null)
...
...
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