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
6017830f
Commit
6017830f
authored
Jul 13, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Plain Diff
代码优化
parents
4f92d9c6
28adc26b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
22 deletions
+29
-22
WatchRecordActivity.kt
...com/mints/wisdomclean/ui/activitys/WatchRecordActivity.kt
+1
-1
FollowVideoFragment.kt
.../com/mints/wisdomclean/ui/fragment/FollowVideoFragment.kt
+1
-1
WatchVideoFragment.kt
...a/com/mints/wisdomclean/ui/fragment/WatchVideoFragment.kt
+2
-2
DramaApiDetailActivity.kt
...ava/com/mints/wisdomclean/video/DramaApiDetailActivity.kt
+5
-5
VideoActivity.kt
...rc/main/java/com/mints/wisdomclean/video/VideoActivity.kt
+20
-13
No files found.
video/app/src/main/java/com/mints/wisdomclean/ui/activitys/WatchRecordActivity.kt
View file @
6017830f
...
...
@@ -83,7 +83,7 @@ class WatchRecordActivity : BaseActivity(), WatchRecordView {
datas
.
add
(
datum
)
}
mWatchRecordAdapter
?.
setNewInstance
(
datas
)
mWatchRecordAdapter
?.
notifyDataSetChanged
()
//
mWatchRecordAdapter?.notifyDataSetChanged()
}
override
fun
getHistoryFail
()
{
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/fragment/FollowVideoFragment.kt
View file @
6017830f
...
...
@@ -95,7 +95,7 @@ class FollowVideoFragment : BaseFragment(), FollowView {
}
showEditView
(
true
)
followAdapter
?.
setEditStyle
(
false
)
followAdapter
?.
notifyDataSetChanged
()
//
followAdapter?.notifyDataSetChanged()
}
override
fun
getCollectListFail
()
{
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/fragment/WatchVideoFragment.kt
View file @
6017830f
...
...
@@ -59,7 +59,7 @@ class WatchVideoFragment : BaseFragment(), RecommendView {
when
(
view
.
id
)
{
R
.
id
.
ll_bottom
->
{
Jzvd
.
goOnPlayOnPause
()
videos
[
position
].
see
Index
++
videos
[
position
].
recommend
Index
++
LocalVedioManager
.
startVedioDetailActivityForType
(
requireActivity
(),
videos
[
position
],
...
...
@@ -84,7 +84,7 @@ class WatchVideoFragment : BaseFragment(), RecommendView {
override
fun
onVideoCompletion
()
{
// showToast("即将为您播放下一集")
Jzvd
.
goOnPlayOnPause
()
videos
[
mCurrentPosition
].
see
Index
++
videos
[
mCurrentPosition
].
recommend
Index
++
LocalVedioManager
.
startVedioDetailActivityForType
(
requireActivity
(),
videos
[
mCurrentPosition
],
...
...
video/app/src/main/java/com/mints/wisdomclean/video/DramaApiDetailActivity.kt
View file @
6017830f
...
...
@@ -176,10 +176,10 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
finish
()
}
vipBtn
?.
setOnClickListener
{
val
bundle
=
Bundle
()
bundle
.
putString
(
VipActivity
.
VEDIO_ID
,
mVedioBean
!!
.
vedioId
.
toString
())
bundle
.
putString
(
VipActivity
.
THIRD_ID
,
mVedioBean
!!
.
thirdId
)
readyGo
(
VipActivity
::
class
.
java
,
bundle
)
val
bundle
=
Bundle
()
bundle
.
putString
(
VipActivity
.
VEDIO_ID
,
mVedioBean
!!
.
vedioId
.
toString
())
bundle
.
putString
(
VipActivity
.
THIRD_ID
,
mVedioBean
!!
.
thirdId
)
readyGo
(
VipActivity
::
class
.
java
,
bundle
)
}
}
...
...
@@ -606,7 +606,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
}
private
fun
showVipCountDialog
(
position
:
Int
)
{
if
(
mVedioBean
!!
.
tipMaxIndex
==
0
||
mVedioBean
!!
.
tipMaxIndex
-
1
<
position
)
return
if
(
position
==
0
||
mVedioBean
!!
.
tipMaxIndex
==
0
||
mVedioBean
!!
.
tipMaxIndex
-
1
<
position
)
return
VipCountDialog
(
this
,
mVedioBean
!!
)
.
setOnDialogDismiss
(
object
:
VipCountDialog
.
OnDialogDismiss
{
override
fun
onDialogDismiss
()
{
...
...
video/app/src/main/java/com/mints/wisdomclean/video/VideoActivity.kt
View file @
6017830f
...
...
@@ -54,9 +54,12 @@ class VideoActivity : BaseActivity(), View.OnClickListener, VideoView,
override
fun
initViewsAndEvents
()
{
videoPresenter
.
attachView
(
this
)
mVedioBean
?.
let
{
videoPresenter
.
getIndexList
(
""
+
it
.
vedioId
)
}
if
(
isPlayNext
)
{
playIndex
=
mVedioBean
!!
.
recommendIndex
playIndex
=
if
(
isPlayNext
)
{
mVedioBean
!!
.
recommendIndex
}
else
{
mVedioBean
!!
.
seeIndex
-
1
}
mCurrentPosition
=
playIndex
initView
()
}
...
...
@@ -116,8 +119,9 @@ class VideoActivity : BaseActivity(), View.OnClickListener, VideoView,
override
fun
onInitComplete
()
{
dialog
?.
setCurrentIndex
(
mCurrentPosition
)
//初始化 自动播放
// autoPlayVideo()
showVipCountDialog
(
mCurrentPosition
)
if
(
mCurrentPosition
!=
mVedioBean
!!
.
seeIndex
)
{
showVipCountDialog
(
mCurrentPosition
)
}
}
override
fun
onPageRelease
(
isNext
:
Boolean
,
position
:
Int
)
{
...
...
@@ -138,10 +142,8 @@ class VideoActivity : BaseActivity(), View.OnClickListener, VideoView,
// loadData()
}
mCurrentPosition
=
position
// autoPlayVideo()
showVipCountDialog
(
mCurrentPosition
)
dialog
?.
setCurrentIndex
(
mCurrentPosition
)
}
...
...
@@ -227,17 +229,18 @@ class VideoActivity : BaseActivity(), View.OnClickListener, VideoView,
}
override
fun
getIndexListSuc
(
indexList
:
IndexList
)
{
// 处理推荐页跳转自动播放下一集逻辑
playIndex
=
if
(
isPlayNext
)
{
mVedioBean
!!
.
recommendIndex
-
1
}
else
{
mVedioBean
!!
.
seeIndex
-
1
}
mVedioBean
=
indexList
.
vedioMsg
indexBean
=
indexList
videos
.
clear
()
videos
.
addAll
(
indexList
.
list
)
adapter
.
setNewInstance
(
getAdapterData
())
adapter
.
notifyDataSetChanged
()
// 处理推荐页跳转自动播放下一集逻辑
if
(!
isPlayNext
)
{
playIndex
=
mVedioBean
!!
.
seeIndex
-
1
}
mCurrentPosition
=
playIndex
recy
.
scrollToPosition
(
playIndex
)
}
...
...
@@ -265,7 +268,7 @@ class VideoActivity : BaseActivity(), View.OnClickListener, VideoView,
dialog
?.
changeLockStatus
(
videos
.
size
)
videos
.
addAll
(
indexList
.
list
)
adapter
.
setNewInstance
(
getAdapterData
())
adapter
.
notifyDataSetChanged
()
//
adapter.notifyDataSetChanged()
}
override
fun
unlockFail
()
{
...
...
@@ -371,8 +374,12 @@ class VideoActivity : BaseActivity(), View.OnClickListener, VideoView,
private
fun
showVipCountDialog
(
position
:
Int
)
{
if
(
isFinishing
)
return
<<<<<<<
HEAD
// mVedioBean!!.tipMaxIndex=5
if
(
mVedioBean
!!
.
tipMaxIndex
==
0
||
mVedioBean
!!
.
tipMaxIndex
-
1
<
position
)
{
=======
if
(
position
==
0
||
mVedioBean
!!
.
tipMaxIndex
==
0
||
mVedioBean
!!
.
tipMaxIndex
-
1
<
position
)
{
>>>>>>>
28
adc26b9eca95e7af32fac4947e11386e2e939f
autoPlayVideo
()
return
}
...
...
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