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
3a81cfca
Commit
3a81cfca
authored
Aug 28, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
a55a3306
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
1 deletion
+58
-1
DramaApiDetailActivity.kt
...a/com/xinfu/helivideo/video/csj/DramaApiDetailActivity.kt
+20
-0
TxVideoActivity.kt
...main/java/com/xinfu/helivideo/video/tx/TxVideoActivity.kt
+20
-1
NewTxVideoActivity.kt
...nfu/helivideo/video/tx/newrecommend/NewTxVideoActivity.kt
+18
-0
No files found.
video/app/src/main/java/com/xinfu/helivideo/video/csj/DramaApiDetailActivity.kt
View file @
3a81cfca
...
@@ -2,6 +2,8 @@ package com.xinfu.helivideo.video.csj
...
@@ -2,6 +2,8 @@ package com.xinfu.helivideo.video.csj
import
android.app.Dialog
import
android.app.Dialog
import
android.os.Bundle
import
android.os.Bundle
import
android.os.Handler
import
android.os.Looper
import
android.util.Log
import
android.util.Log
import
android.view.View
import
android.view.View
import
android.widget.Button
import
android.widget.Button
...
@@ -22,6 +24,7 @@ import com.xinfu.helivideo.ad.express.ExpressAdCallback
...
@@ -22,6 +24,7 @@ import com.xinfu.helivideo.ad.express.ExpressAdCallback
import
com.xinfu.helivideo.ad.express.ExpressManager
import
com.xinfu.helivideo.ad.express.ExpressManager
import
com.xinfu.helivideo.common.Constant
import
com.xinfu.helivideo.common.Constant
import
com.xinfu.helivideo.manager.LocalVedioManager
import
com.xinfu.helivideo.manager.LocalVedioManager
import
com.xinfu.helivideo.manager.TrackManager
import
com.xinfu.helivideo.manager.UserManager
import
com.xinfu.helivideo.manager.UserManager
import
com.xinfu.helivideo.mvp.model.IndexList
import
com.xinfu.helivideo.mvp.model.IndexList
import
com.xinfu.helivideo.mvp.model.NineShowBean
import
com.xinfu.helivideo.mvp.model.NineShowBean
...
@@ -37,6 +40,7 @@ import com.xinfu.helivideo.ui.widgets.VideoEpisodeDialog
...
@@ -37,6 +40,7 @@ import com.xinfu.helivideo.ui.widgets.VideoEpisodeDialog
import
com.xinfu.helivideo.ui.widgets.VipCountDialog
import
com.xinfu.helivideo.ui.widgets.VipCountDialog
import
com.xinfu.helivideo.utils.AppPreferencesManager
import
com.xinfu.helivideo.utils.AppPreferencesManager
import
com.xinfu.helivideo.utils.SpanUtils
import
com.xinfu.helivideo.utils.SpanUtils
import
com.xinfu.helivideo.utils.ToastUtil
import
com.xinfu.helivideo.utils.UIUtils
import
com.xinfu.helivideo.utils.UIUtils
import
com.xinfu.library.utils.GlideUtils
import
com.xinfu.library.utils.GlideUtils
import
com.xinfu.library.utils.nodoubleclick.AntiShake
import
com.xinfu.library.utils.nodoubleclick.AntiShake
...
@@ -108,6 +112,8 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -108,6 +112,8 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
private
var
mCurrentIndex
=
0
private
var
mCurrentIndex
=
0
private
var
lastVipStatus
=
false
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
val
json
=
extras
?.
getString
(
Constant
.
VEDIO_BEAN
)
val
json
=
extras
?.
getString
(
Constant
.
VEDIO_BEAN
)
isThirdId
=
extras
?.
getBoolean
(
Constant
.
VEDIO_THIRD
,
false
)
==
true
isThirdId
=
extras
?.
getBoolean
(
Constant
.
VEDIO_THIRD
,
false
)
==
true
...
@@ -196,6 +202,10 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -196,6 +202,10 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
if
(
DPSdk
.
isStartSuccess
())
{
if
(
DPSdk
.
isStartSuccess
())
{
init
()
init
()
}
}
if
(
mVipFlag
)
{
lastVipStatus
=
true
}
}
}
override
fun
isApplyKitKatTranslucency
()
=
true
override
fun
isApplyKitKatTranslucency
()
=
true
...
@@ -261,6 +271,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -261,6 +271,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
if
(
mVipFlag
!=
UserManager
.
getInstance
().
vipFlag
&&
UserManager
.
getInstance
().
vipFlag
)
{
if
(
mVipFlag
!=
UserManager
.
getInstance
().
vipFlag
&&
UserManager
.
getInstance
().
vipFlag
)
{
// 重置状态
// 重置状态
lastVipStatus
=
true
resetData
()
resetData
()
}
}
}
}
...
@@ -404,6 +415,15 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
...
@@ -404,6 +415,15 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
}
}
}
}
TrackManager
.
getInstance
().
getMyInfo
()
// 如果从vip变成非vip提示用户退出续费
if
(
lastVipStatus
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
ToastUtil
.
showLong
(
context
,
"您的体验会员已过期"
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
finish
()
},
500
)
}
return
needBlock
return
needBlock
}
}
...
...
video/app/src/main/java/com/xinfu/helivideo/video/tx/TxVideoActivity.kt
View file @
3a81cfca
...
@@ -2,6 +2,8 @@ package com.xinfu.helivideo.video.tx
...
@@ -2,6 +2,8 @@ package com.xinfu.helivideo.video.tx
import
android.app.Dialog
import
android.app.Dialog
import
android.os.Bundle
import
android.os.Bundle
import
android.os.Handler
import
android.os.Looper
import
android.view.View
import
android.view.View
import
com.google.gson.Gson
import
com.google.gson.Gson
import
com.xinfu.helivideo.R
import
com.xinfu.helivideo.R
...
@@ -12,6 +14,7 @@ import com.xinfu.helivideo.ad.draw.DrawExpressManager
...
@@ -12,6 +14,7 @@ import com.xinfu.helivideo.ad.draw.DrawExpressManager
import
com.xinfu.helivideo.ad.express.ExpressManager
import
com.xinfu.helivideo.ad.express.ExpressManager
import
com.xinfu.helivideo.common.Constant
import
com.xinfu.helivideo.common.Constant
import
com.xinfu.helivideo.manager.LocalVedioManager
import
com.xinfu.helivideo.manager.LocalVedioManager
import
com.xinfu.helivideo.manager.TrackManager
import
com.xinfu.helivideo.manager.UserManager
import
com.xinfu.helivideo.manager.UserManager
import
com.xinfu.helivideo.mvp.model.*
import
com.xinfu.helivideo.mvp.model.*
import
com.xinfu.helivideo.mvp.model.IndexList.VedioEpisodeBean
import
com.xinfu.helivideo.mvp.model.IndexList.VedioEpisodeBean
...
@@ -26,6 +29,7 @@ import com.xinfu.helivideo.ui.widgets.VideoEpisodeDialog
...
@@ -26,6 +29,7 @@ import com.xinfu.helivideo.ui.widgets.VideoEpisodeDialog
import
com.xinfu.helivideo.ui.widgets.VipCountDialog
import
com.xinfu.helivideo.ui.widgets.VipCountDialog
import
com.xinfu.helivideo.utils.AppPreferencesManager
import
com.xinfu.helivideo.utils.AppPreferencesManager
import
com.xinfu.helivideo.utils.SpanUtils
import
com.xinfu.helivideo.utils.SpanUtils
import
com.xinfu.helivideo.utils.ToastUtil
import
com.xinfu.helivideo.video.tx.adapter.TxVideoAdapter
import
com.xinfu.helivideo.video.tx.adapter.TxVideoAdapter
import
com.xinfu.library.utils.GlideUtils
import
com.xinfu.library.utils.GlideUtils
import
com.xinfu.library.utils.nodoubleclick.AntiShake
import
com.xinfu.library.utils.nodoubleclick.AntiShake
...
@@ -50,6 +54,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
...
@@ -50,6 +54,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
private
var
isPlayNext
=
false
private
var
isPlayNext
=
false
private
var
playIndex
=
1
private
var
playIndex
=
1
private
var
lastVipStatus
=
false
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_tx_video
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_tx_video
...
@@ -57,6 +62,10 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
...
@@ -57,6 +62,10 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
videoPresenter
.
attachView
(
this
)
videoPresenter
.
attachView
(
this
)
mVedioBean
?.
let
{
videoPresenter
.
getIndexList
(
""
+
it
.
vedioId
)
}
mVedioBean
?.
let
{
videoPresenter
.
getIndexList
(
""
+
it
.
vedioId
)
}
initView
()
initView
()
if
(
mVipFlag
)
{
lastVipStatus
=
true
}
}
}
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
...
@@ -81,6 +90,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
...
@@ -81,6 +90,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
if
(
mVipFlag
!=
UserManager
.
getInstance
().
vipFlag
&&
UserManager
.
getInstance
().
vipFlag
)
{
if
(
mVipFlag
!=
UserManager
.
getInstance
().
vipFlag
&&
UserManager
.
getInstance
().
vipFlag
)
{
// 重置状态
// 重置状态
lastVipStatus
=
true
isPlayNext
=
false
isPlayNext
=
false
playIndex
=
super_short_video_view
.
currentPosition
playIndex
=
super_short_video_view
.
currentPosition
mVedioBean
?.
let
{
videoPresenter
.
getIndexList
(
""
+
it
.
vedioId
)
}
mVedioBean
?.
let
{
videoPresenter
.
getIndexList
(
""
+
it
.
vedioId
)
}
...
@@ -136,6 +146,15 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
...
@@ -136,6 +146,15 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
mVedioBean
!!
.
orderTags
=
orderTagsList
mVedioBean
!!
.
orderTags
=
orderTagsList
LocalVedioManager
.
commitVedio
(
mVedioBean
!!
)
LocalVedioManager
.
commitVedio
(
mVedioBean
!!
)
}
}
TrackManager
.
getInstance
().
getMyInfo
()
// 如果从vip变成非vip提示用户退出续费
if
(
lastVipStatus
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
ToastUtil
.
showLong
(
context
,
"您的体验会员已过期"
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
finish
()
},
500
)
}
}
}
fm_bottom
.
setOnClickListener
(
this
)
fm_bottom
.
setOnClickListener
(
this
)
...
@@ -390,7 +409,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
...
@@ -390,7 +409,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
if
(
isLuckyShow
||
localLucky
)
{
if
(
isLuckyShow
||
localLucky
)
{
ll_lucky
.
visibility
=
View
.
VISIBLE
ll_lucky
.
visibility
=
View
.
VISIBLE
context
?.
let
{
GlideUtils
.
loadRoundImageViewGif
(
it
,
R
.
drawable
.
ic_nine
,
iv_lucky_gif
)
}
context
?.
let
{
GlideUtils
.
loadRoundImageViewGif
(
it
,
R
.
drawable
.
ic_nine
,
iv_lucky_gif
)
}
}
else
{
}
else
{
ll_lucky
.
visibility
=
View
.
GONE
ll_lucky
.
visibility
=
View
.
GONE
...
...
video/app/src/main/java/com/xinfu/helivideo/video/tx/newrecommend/NewTxVideoActivity.kt
View file @
3a81cfca
package
com.xinfu.helivideo.video.tx.newrecommend
package
com.xinfu.helivideo.video.tx.newrecommend
import
android.os.Bundle
import
android.os.Bundle
import
android.os.Handler
import
android.os.Looper
import
android.view.View
import
android.view.View
import
androidx.core.content.ContextCompat
import
androidx.core.content.ContextCompat
import
com.google.gson.Gson
import
com.google.gson.Gson
...
@@ -11,6 +13,7 @@ import com.xinfu.helivideo.ad.NoPreAdManager
...
@@ -11,6 +13,7 @@ import com.xinfu.helivideo.ad.NoPreAdManager
import
com.xinfu.helivideo.ad.express.ExpressManager
import
com.xinfu.helivideo.ad.express.ExpressManager
import
com.xinfu.helivideo.common.Constant
import
com.xinfu.helivideo.common.Constant
import
com.xinfu.helivideo.manager.LocalVedioManager
import
com.xinfu.helivideo.manager.LocalVedioManager
import
com.xinfu.helivideo.manager.TrackManager
import
com.xinfu.helivideo.manager.UserManager
import
com.xinfu.helivideo.manager.UserManager
import
com.xinfu.helivideo.mvp.model.*
import
com.xinfu.helivideo.mvp.model.*
import
com.xinfu.helivideo.mvp.model.IndexList.VedioEpisodeBean
import
com.xinfu.helivideo.mvp.model.IndexList.VedioEpisodeBean
...
@@ -23,6 +26,7 @@ import com.xinfu.helivideo.ui.adapter.VideoEpisodeAdapter
...
@@ -23,6 +26,7 @@ import com.xinfu.helivideo.ui.adapter.VideoEpisodeAdapter
import
com.xinfu.helivideo.ui.widgets.NewVideoEpisodeDialog
import
com.xinfu.helivideo.ui.widgets.NewVideoEpisodeDialog
import
com.xinfu.helivideo.utils.AppPreferencesManager
import
com.xinfu.helivideo.utils.AppPreferencesManager
import
com.xinfu.helivideo.utils.SpanUtils
import
com.xinfu.helivideo.utils.SpanUtils
import
com.xinfu.helivideo.utils.ToastUtil
import
com.xinfu.helivideo.video.tx.VideoModel
import
com.xinfu.helivideo.video.tx.VideoModel
import
com.xinfu.library.utils.GlideUtils
import
com.xinfu.library.utils.GlideUtils
import
com.xinfu.library.utils.nodoubleclick.AntiShake
import
com.xinfu.library.utils.nodoubleclick.AntiShake
...
@@ -47,6 +51,7 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
...
@@ -47,6 +51,7 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
private
var
orderTagsList
:
ArrayList
<
String
>?
=
null
private
var
orderTagsList
:
ArrayList
<
String
>?
=
null
private
var
playIndex
=
1
private
var
playIndex
=
1
private
var
lastVipStatus
=
false
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_new_tx_video
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_new_tx_video
...
@@ -54,6 +59,9 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
...
@@ -54,6 +59,9 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
videoPresenter
.
attachView
(
this
)
videoPresenter
.
attachView
(
this
)
mVedioBean
?.
let
{
videoPresenter
.
getIndexList2
(
""
+
it
.
vedioId
)
}
mVedioBean
?.
let
{
videoPresenter
.
getIndexList2
(
""
+
it
.
vedioId
)
}
initView
()
initView
()
if
(
mVipFlag
)
{
lastVipStatus
=
true
}
}
}
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
...
@@ -74,6 +82,7 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
...
@@ -74,6 +82,7 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
if
(
mVipFlag
!=
UserManager
.
getInstance
().
vipFlag
&&
UserManager
.
getInstance
().
vipFlag
)
{
if
(
mVipFlag
!=
UserManager
.
getInstance
().
vipFlag
&&
UserManager
.
getInstance
().
vipFlag
)
{
// 重置状态
// 重置状态
lastVipStatus
=
true
playIndex
=
new_super_short_video_view
.
currentPosition
playIndex
=
new_super_short_video_view
.
currentPosition
mVedioBean
?.
let
{
videoPresenter
.
getIndexList2
(
""
+
it
.
vedioId
)
}
mVedioBean
?.
let
{
videoPresenter
.
getIndexList2
(
""
+
it
.
vedioId
)
}
}
}
...
@@ -125,6 +134,15 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
...
@@ -125,6 +134,15 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
mVedioBean
!!
.
isRecommendVedio
=
true
mVedioBean
!!
.
isRecommendVedio
=
true
LocalVedioManager
.
commitVedio
(
mVedioBean
!!
)
LocalVedioManager
.
commitVedio
(
mVedioBean
!!
)
}
}
TrackManager
.
getInstance
().
getMyInfo
()
// 如果从vip变成非vip提示用户退出续费
if
(
lastVipStatus
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
ToastUtil
.
showLong
(
context
,
"您的体验会员已过期"
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
finish
()
},
500
)
}
}
}
fm_bottom
.
setOnClickListener
(
this
)
fm_bottom
.
setOnClickListener
(
this
)
...
...
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