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
032fcc5e
Commit
032fcc5e
authored
Sep 25, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Plain Diff
代码优化
parents
df2c2ab5
e45337f9
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
20 deletions
+51
-20
MusicFragment.kt
...in/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
+20
-0
RedpkgFragment.kt
...n/java/com/duben/dayplaylet/ui/fragment/RedpkgFragment.kt
+9
-10
CountDownVideoView.java
...a/com/duben/dayplaylet/ui/widgets/CountDownVideoView.java
+0
-1
DramaApiDetailActivity.kt
.../com/duben/dayplaylet/video/csj/DramaApiDetailActivity.kt
+16
-7
drama_activity_api_detail.xml
video/app/src/main/res/layout/drama_activity_api_detail.xml
+2
-1
fragment_music.xml
video/app/src/main/res/layout/fragment_music.xml
+2
-1
layout_draw_header.xml
video/app/src/main/res/layout/layout_draw_header.xml
+2
-0
No files found.
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
View file @
032fcc5e
...
@@ -32,6 +32,7 @@ import com.duben.dayplaylet.ad.AdManager
...
@@ -32,6 +32,7 @@ import com.duben.dayplaylet.ad.AdManager
import
com.duben.dayplaylet.ad.AdStatusListener
import
com.duben.dayplaylet.ad.AdStatusListener
import
com.duben.dayplaylet.ad.NoPreAdManager
import
com.duben.dayplaylet.ad.NoPreAdManager
import
com.duben.dayplaylet.ad.express.MyExpressManager
import
com.duben.dayplaylet.ad.express.MyExpressManager
import
com.duben.dayplaylet.ad.half.HalfScreenManager
import
com.duben.dayplaylet.common.AppConfig
import
com.duben.dayplaylet.common.AppConfig
import
com.duben.dayplaylet.common.Constant
import
com.duben.dayplaylet.common.Constant
import
com.duben.dayplaylet.manager.DPHolder
import
com.duben.dayplaylet.manager.DPHolder
...
@@ -52,7 +53,13 @@ import com.duben.dayplaylet.utils.SpanUtils
...
@@ -52,7 +53,13 @@ import com.duben.dayplaylet.utils.SpanUtils
import
com.duben.library.utils.nodoubleclick.AntiShake
import
com.duben.library.utils.nodoubleclick.AntiShake
import
io.reactivex.Observer
import
io.reactivex.Observer
import
io.reactivex.disposables.Disposable
import
io.reactivex.disposables.Disposable
import
kotlinx.android.synthetic.main.drama_activity_api_detail.*
import
kotlinx.android.synthetic.main.fragment_music.*
import
kotlinx.android.synthetic.main.fragment_music.*
import
kotlinx.android.synthetic.main.fragment_music.cl_reward
import
kotlinx.android.synthetic.main.fragment_music.iv_cash_reward
import
kotlinx.android.synthetic.main.fragment_music.iv_gold_reward
import
kotlinx.android.synthetic.main.fragment_music.tv_cash_reward
import
kotlinx.android.synthetic.main.fragment_music.tv_gold_reward
import
kotlinx.android.synthetic.main.layout_draw_header.*
import
kotlinx.android.synthetic.main.layout_draw_header.*
/**
/**
...
@@ -615,6 +622,10 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
...
@@ -615,6 +622,10 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
mainHandler
.
postDelayed
({
mainHandler
.
postDelayed
({
addAnimation
(
iv_cash_reward
,
iv_cash
)
addAnimation
(
iv_cash_reward
,
iv_cash
)
},
800
)
},
800
)
mainHandler
.
postDelayed
({
rope
=
null
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
300
).
playOn
(
rl_cash
)
},
1000
)
},
100
)
},
100
)
}
}
...
@@ -634,8 +645,17 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
...
@@ -634,8 +645,17 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
mainHandler
.
postDelayed
({
mainHandler
.
postDelayed
({
addAnimation
(
iv_gold_reward
,
iv_gold
)
addAnimation
(
iv_gold_reward
,
iv_gold
)
},
800
)
},
800
)
mainHandler
.
postDelayed
({
rope
=
null
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
300
).
playOn
(
rl_gold
)
},
1000
)
},
100
)
},
100
)
}
}
mainHandler
.
postDelayed
({
cl_reward
.
visibility
=
View
.
GONE
},
1500
)
}
}
override
fun
reportAddCoinMsgSuc
(
coin
:
Int
,
di
:
Int
)
{
override
fun
reportAddCoinMsgSuc
(
coin
:
Int
,
di
:
Int
)
{
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/RedpkgFragment.kt
View file @
032fcc5e
...
@@ -313,17 +313,16 @@ class RedpkgFragment : LazyLoadBaseFragment(), View.OnClickListener, RedpkgView
...
@@ -313,17 +313,16 @@ class RedpkgFragment : LazyLoadBaseFragment(), View.OnClickListener, RedpkgView
return
return
}
}
if
(!
isCash
)
{
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putString
(
LoadingActivity
.
TEXT
,
"正在为您发放奖励.."
)
bundle
.
putString
(
LoadingActivity
.
TEXT
,
"正在为您发放奖励.."
)
readyGo
(
LoadingActivity
::
class
.
java
,
bundle
)
readyGo
(
LoadingActivity
::
class
.
java
,
bundle
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
if
(!
isCash
)
{
awardVideo
(
Constant
.
CARRIERTYPE_REWARD_HONGBAO
,
cash
)
awardVideo
(
Constant
.
CARRIERTYPE_REWARD_HONGBAO
,
cash
)
},
2200
)
}
else
{
}
else
{
awardVideo
(
Constant
.
CARRIERTYPE_FORCASH_HONGBAO
,
cash
,
unitId
)
awardVideo
(
Constant
.
CARRIERTYPE_FORCASH_HONGBAO
,
cash
,
unitId
)
}
}
},
2200
)
}
}
override
fun
rdHongbaoClickFail
()
{
override
fun
rdHongbaoClickFail
()
{
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/widgets/CountDownVideoView.java
View file @
032fcc5e
...
@@ -66,7 +66,6 @@ public class CountDownVideoView extends LinearLayout {
...
@@ -66,7 +66,6 @@ public class CountDownVideoView extends LinearLayout {
}
}
public
void
resume
()
{
public
void
resume
()
{
isOver
=
false
;
cdCountVedioView
.
resume
();
cdCountVedioView
.
resume
();
}
}
...
...
video/app/src/main/java/com/duben/dayplaylet/video/csj/DramaApiDetailActivity.kt
View file @
032fcc5e
...
@@ -15,6 +15,8 @@ import android.widget.ImageView
...
@@ -15,6 +15,8 @@ import android.widget.ImageView
import
android.widget.RelativeLayout
import
android.widget.RelativeLayout
import
androidx.core.content.ContextCompat
import
androidx.core.content.ContextCompat
import
com.bytedance.sdk.dp.*
import
com.bytedance.sdk.dp.*
import
com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.YoYo
import
com.google.gson.Gson
import
com.google.gson.Gson
import
com.duben.dayplaylet.R
import
com.duben.dayplaylet.R
import
com.duben.dayplaylet.ad.AdManager
import
com.duben.dayplaylet.ad.AdManager
...
@@ -54,6 +56,8 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -54,6 +56,8 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
var
outerDrama
:
DPDrama
?
=
null
var
outerDrama
:
DPDrama
?
=
null
}
}
private
var
rope
:
YoYo
.
YoYoString
?
=
null
private
val
videoPresenter
by
lazy
{
VideoPresenter
()
}
private
val
videoPresenter
by
lazy
{
VideoPresenter
()
}
private
var
dpWidget
:
IDPWidget
?
=
null
private
var
dpWidget
:
IDPWidget
?
=
null
...
@@ -431,7 +435,6 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -431,7 +435,6 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
cdvv
.
setTime
(
data
.
surplusSeconds
)
cdvv
.
setTime
(
data
.
surplusSeconds
)
cdvv
.
start
()
cdvv
.
start
()
cdvv
.
setCountDownVideoListener
(
this
)
cdvv
.
setCountDownVideoListener
(
this
)
cl_red_box
.
isClickable
=
false
cl_red_box
.
setOnClickListener
{
cl_red_box
.
setOnClickListener
{
if
(!
cdvv
.
isOver
)
return
@setOnClickListener
if
(!
cdvv
.
isOver
)
return
@setOnClickListener
...
@@ -449,7 +452,6 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -449,7 +452,6 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
}
}
override
fun
onLoadingFinish
()
{
override
fun
onLoadingFinish
()
{
cl_red_box
.
isClickable
=
true
tv_tips
.
visibility
=
View
.
VISIBLE
tv_tips
.
visibility
=
View
.
VISIBLE
triangle
.
visibility
=
View
.
VISIBLE
triangle
.
visibility
=
View
.
VISIBLE
}
}
...
@@ -512,8 +514,6 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -512,8 +514,6 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
super
.
onClick
(
dialog
,
v
)
super
.
onClick
(
dialog
,
v
)
dialog
?.
dismiss
()
dialog
?.
dismiss
()
showAd
(
Constant
.
CARRIERTYPE_VEDIO
)
showAd
(
Constant
.
CARRIERTYPE_VEDIO
)
cl_red_box
.
isClickable
=
false
}
}
}
}
)
)
...
@@ -522,7 +522,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -522,7 +522,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
}
}
private
fun
showAd
(
carrierType
:
String
,
drama
:
DPDrama
?
=
null
,
widget
:
IDPWidget
?
=
null
)
{
private
fun
showAd
(
carrierType
:
String
,
drama
:
DPDrama
?
=
null
,
widget
:
IDPWidget
?
=
null
)
{
HalfScreenManager
.
getInstance
().
preLoadAd
(
this
)
//
HalfScreenManager.getInstance().preLoadAd(this)
AdManager
.
instance
.
showAd
(
this
@DramaApiDetailActivity
,
carrierType
,
AdManager
.
instance
.
showAd
(
this
@DramaApiDetailActivity
,
carrierType
,
object
:
AdStatusListener
{
object
:
AdStatusListener
{
...
@@ -645,8 +645,13 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -645,8 +645,13 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
addAnimation
(
iv_cash_reward
,
iv_cash
)
addAnimation
(
iv_cash_reward
,
iv_cash
)
},
800
)
},
800
)
},
100
)
},
100
)
mainHandler
.
postDelayed
({
rope
=
null
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
300
).
playOn
(
rl_cash
)
},
1000
)
}
}
if
(
goldReward
<=
0
)
{
if
(
goldReward
<=
0
)
{
iv_gold_reward
.
visibility
=
View
.
GONE
iv_gold_reward
.
visibility
=
View
.
GONE
tv_gold_reward
.
visibility
=
View
.
GONE
tv_gold_reward
.
visibility
=
View
.
GONE
...
@@ -664,13 +669,17 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -664,13 +669,17 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
addAnimation
(
iv_gold_reward
,
iv_gold
)
addAnimation
(
iv_gold_reward
,
iv_gold
)
},
800
)
},
800
)
},
100
)
},
100
)
mainHandler
.
postDelayed
({
rope
=
null
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
300
).
playOn
(
rl_gold
)
},
1000
)
}
}
HalfScreenManager
.
getInstance
().
preLoadAd
(
this
)
//
HalfScreenManager.getInstance().preLoadAd(this)
mainHandler
.
postDelayed
({
mainHandler
.
postDelayed
({
cl_reward
.
visibility
=
View
.
GONE
cl_reward
.
visibility
=
View
.
GONE
// 展示插屏
// 展示插屏
HalfScreenManager
.
getInstance
().
showAd
(
this
,
null
)
//
HalfScreenManager.getInstance().showAd(this, null)
},
1500
)
},
1500
)
}
}
...
...
video/app/src/main/res/layout/drama_activity_api_detail.xml
View file @
032fcc5e
...
@@ -56,7 +56,8 @@
...
@@ -56,7 +56,8 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom|end"
android:layout_gravity=
"bottom|end"
android:layout_marginEnd=
"@dimen/dp_10"
android:layout_marginEnd=
"@dimen/dp_10"
android:layout_marginBottom=
"260dp"
/>
android:layout_marginBottom=
"260dp"
android:visibility=
"gone"
/>
<ImageView
<ImageView
android:id=
"@+id/iv_pause"
android:id=
"@+id/iv_pause"
...
...
video/app/src/main/res/layout/fragment_music.xml
View file @
032fcc5e
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentEnd=
"true"
android:layout_alignParentEnd=
"true"
android:layout_marginTop=
"160dp"
android:layout_marginTop=
"160dp"
android:layout_marginEnd=
"15dp"
>
android:layout_marginEnd=
"15dp"
android:visibility=
"gone"
>
<ImageView
<ImageView
android:id=
"@+id/iv_open_cash"
android:id=
"@+id/iv_open_cash"
...
...
video/app/src/main/res/layout/layout_draw_header.xml
View file @
032fcc5e
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
<RelativeLayout
<RelativeLayout
android:id=
"@+id/rl_cash"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"42dp"
android:layout_height=
"42dp"
android:layout_marginStart=
"16dp"
>
android:layout_marginStart=
"16dp"
>
...
@@ -59,6 +60,7 @@
...
@@ -59,6 +60,7 @@
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
<RelativeLayout
android:id=
"@+id/rl_gold"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"42dp"
android:layout_height=
"42dp"
android:layout_gravity=
"end"
android:layout_gravity=
"end"
...
...
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