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
9a1ff634
Commit
9a1ff634
authored
Aug 25, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推荐页剧集添加指定看剧集数
parent
cc89c63a
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
928 additions
and
123 deletions
+928
-123
AndroidManifest.xml
video/app/src/main/AndroidManifest.xml
+1
-1
LocalVedioManager.kt
...ain/java/com/mints/helivideo/manager/LocalVedioManager.kt
+1
-2
IndexList.java
...rc/main/java/com/mints/helivideo/mvp/model/IndexList.java
+9
-1
Vedio3dos.kt
.../src/main/java/com/mints/helivideo/mvp/model/Vedio3dos.kt
+10
-0
VideoMultiItemEntity.kt
...ava/com/mints/helivideo/mvp/model/VideoMultiItemEntity.kt
+7
-0
VideoPresenter.kt
...java/com/mints/helivideo/mvp/presenters/VideoPresenter.kt
+38
-0
LoanService.java
...pp/src/main/java/com/mints/helivideo/net/LoanService.java
+8
-0
RecommendActivity.kt
...ava/com/mints/helivideo/ui/activitys/RecommendActivity.kt
+1
-3
NewVideoEpisodeDialog.kt
...a/com/mints/helivideo/ui/widgets/NewVideoEpisodeDialog.kt
+166
-0
NewSuperShortVideoView.java
...livideo/video/tx/newrecommend/NewSuperShortVideoView.java
+308
-0
NewTxVideoActivity.kt
...nts/helivideo/video/tx/newrecommend/NewTxVideoActivity.kt
+111
-110
NewTxVideoAdapter.kt
...ints/helivideo/video/tx/newrecommend/NewTxVideoAdapter.kt
+262
-0
activity_new_tx_video.xml
video/app/src/main/res/layout/activity_new_tx_video.xml
+6
-6
No files found.
video/app/src/main/AndroidManifest.xml
View file @
9a1ff634
...
...
@@ -188,7 +188,7 @@
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".video.tx.NewTxVideoActivity"
android:name=
".video.tx.
newrecommend.
NewTxVideoActivity"
android:exported=
"false"
android:hardwareAccelerated=
"true"
android:screenOrientation=
"portrait"
/>
...
...
video/app/src/main/java/com/mints/helivideo/manager/LocalVedioManager.kt
View file @
9a1ff634
...
...
@@ -11,11 +11,10 @@ import com.mints.helivideo.ad.express.ExpressManager
import
com.mints.library.utils.json.JsonUtil
import
com.mints.helivideo.common.Constant
import
com.mints.helivideo.mvp.model.VedioBean
import
com.mints.helivideo.ui.activitys.RecommendActivity
import
com.mints.helivideo.utils.AppPreferencesManager
import
com.mints.helivideo.utils.ToastUtil
import
com.mints.helivideo.video.csj.DramaApiDetailActivity
import
com.mints.helivideo.video.tx.NewTxVideoActivity
import
com.mints.helivideo.video.tx.
newrecommend.
NewTxVideoActivity
import
com.mints.helivideo.video.tx.TxVideoActivity
/**
...
...
video/app/src/main/java/com/mints/helivideo/mvp/model/IndexList.java
View file @
9a1ff634
...
...
@@ -34,13 +34,21 @@ public class IndexList implements Serializable {
this
.
list
=
list
;
}
public
class
VedioEpisodeBean
implements
Serializable
{
private
String
vedioUrl
;
private
int
vedioIndex
;
private
boolean
lock
;
private
String
title
;
private
int
vedioId
;
private
String
dos
;
public
String
getDos
()
{
return
dos
;
}
public
void
setDos
(
String
dos
)
{
this
.
dos
=
dos
;
}
public
String
getVedioUrl
()
{
return
vedioUrl
;
...
...
video/app/src/main/java/com/mints/helivideo/mvp/model/Vedio3dos.kt
0 → 100644
View file @
9a1ff634
package
com.mints.helivideo.mvp.model
const
val
VEDIO3DOS_AD
=
"ad"
const
val
VEDIO3DOS_FREE
=
"free"
const
val
VEDIO3DOS_PAY
=
"pay"
data class
Vedio3dos
(
val
list
:
List
<
String
>,
val
num
:
Int
)
\ No newline at end of file
video/app/src/main/java/com/mints/helivideo/mvp/model/VideoMultiItemEntity.kt
View file @
9a1ff634
...
...
@@ -25,3 +25,10 @@ data class VideoMultiItemEntity3(
var
videos
:
List
<
VedioBean
>?,
var
adView
:
FrameLayout
?
)
:
MultiItemEntity
,
java
.
io
.
Serializable
data class
VideoMultiItemEntity4
(
override
var
itemType
:
Int
,
var
video
:
IndexList
.
VedioEpisodeBean
?,
var
videoModel
:
VideoModel
?,
var
type
:
String
?
)
:
MultiItemEntity
,
java
.
io
.
Serializable
\ No newline at end of file
video/app/src/main/java/com/mints/helivideo/mvp/presenters/VideoPresenter.kt
View file @
9a1ff634
...
...
@@ -54,6 +54,44 @@ class VideoPresenter : BasePresenter<VideoView>() {
})
}
fun
getIndexList2
(
thirdId
:
String
,
csj
:
Boolean
=
false
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"vedioId"
]
=
thirdId
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getIndexList2
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
IndexList
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
IndexList
>)
{
if
(
isLinkView
)
return
view
.
hideLoading
()
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
view
.
getIndexListSuc
(
baseResponse
.
data
)
else
->
{
view
.
getIndexListFail
()
view
.
showToast
(
message
)
}
}
}
override
fun
onError
(
e
:
Throwable
?)
{
if
(
isLinkView
)
return
view
.
hideLoading
()
view
.
showToast
(
e
?.
message
)
view
.
getIndexListFail
()
}
})
}
fun
collect
(
videoId
:
String
)
{
val
vo
=
HashMap
<
String
,
Any
>()
...
...
video/app/src/main/java/com/mints/helivideo/net/LoanService.java
View file @
9a1ff634
...
...
@@ -206,6 +206,14 @@ public interface LoanService {
@POST
(
"api/vedio/getIndexList"
)
Observable
<
BaseResponse
<
IndexList
>>
getIndexList
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 优选剧 剧情列表
*
* @return
*/
@POST
(
"api/vedio/getIndexList/vedio3"
)
Observable
<
BaseResponse
<
IndexList
>>
getIndexList2
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 播放链接
*
...
...
video/app/src/main/java/com/mints/helivideo/ui/activitys/RecommendActivity.kt
View file @
9a1ff634
...
...
@@ -13,9 +13,7 @@ import com.mints.helivideo.R
import
com.mints.helivideo.common.Constant
import
com.mints.helivideo.mvp.model.RecommendBean
import
com.mints.helivideo.ui.activitys.base.BaseActivity
import
com.mints.helivideo.utils.LogUtil
import
com.mints.helivideo.video.tx.NewTxVideoActivity
import
com.mints.helivideo.video.tx.TXVideoBaseView
import
com.mints.helivideo.video.tx.newrecommend.NewTxVideoActivity
import
com.mints.helivideo.video.tx.TXVodPlayerWrapper
import
com.mints.helivideo.video.tx.VideoModel
import
com.mints.library.utils.json.JsonUtil
...
...
video/app/src/main/java/com/mints/helivideo/ui/widgets/NewVideoEpisodeDialog.kt
0 → 100644
View file @
9a1ff634
package
com.mints.helivideo.ui.widgets
import
android.app.Dialog
import
android.content.Context
import
android.view.*
import
android.widget.ImageView
import
android.widget.TextView
import
androidx.core.content.ContextCompat
import
androidx.viewpager2.widget.ViewPager2
import
com.google.android.material.tabs.TabLayout
import
com.google.android.material.tabs.TabLayoutMediator
import
com.mints.helivideo.R
import
com.mints.helivideo.mvp.model.EpisodeBean
import
com.mints.helivideo.mvp.model.VEDIO3DOS_FREE
import
com.mints.helivideo.mvp.model.VedioBean
import
com.mints.helivideo.mvp.model.VideoMultiItemEntity4
import
com.mints.helivideo.ui.adapter.VideoEpisodeAdapter
import
com.mints.helivideo.utils.CommonUtils
/**
* @author Assen
* @date 2023/7/5
* @desc
*/
class
NewVideoEpisodeDialog
(
context
:
Context
,
val
vedioBean
:
VedioBean
?,
val
data
:
List
<
VideoMultiItemEntity4
>
)
:
Dialog
(
context
,
R
.
style
.
dialog
)
{
private
var
mRealSeeIndex
=
0
private
val
lp
:
WindowManager
.
LayoutParams
private
val
vp2
:
ViewPager2
private
val
tab
:
TabLayout
private
val
ivClose
:
ImageView
private
val
mData
=
mutableListOf
<
EpisodeBean
>()
private
var
adapter
:
VideoEpisodeAdapter
?
=
null
init
{
setContentView
(
R
.
layout
.
dialog_video_episode
)
// 设置window属性
lp
=
window
!!
.
attributes
lp
.
gravity
=
Gravity
.
BOTTOM
lp
.
width
=
WindowManager
.
LayoutParams
.
MATCH_PARENT
lp
.
height
=
WindowManager
.
LayoutParams
.
WRAP_CONTENT
lp
.
windowAnimations
=
R
.
style
.
DialogAnimBottom
// lp.dimAmount = 0; // 去背景遮盖
// lp.alpha = 1.0f;//透明效果
window
!!
.
attributes
=
lp
// 设置外部不可关闭
setCancelable
(
true
)
setCanceledOnTouchOutside
(
true
)
setOnKeyListener
{
_
,
i
,
_
->
i
==
KeyEvent
.
KEYCODE_BACK
}
vp2
=
findViewById
(
R
.
id
.
vp2_episode
)
tab
=
findViewById
(
R
.
id
.
tab_episode
)
ivClose
=
findViewById
(
R
.
id
.
close_iv
)
ivClose
.
setOnClickListener
{
dismiss
()
}
findViewById
<
TextView
>(
R
.
id
.
title_tv
).
text
=
vedioBean
?.
title
findViewById
<
TextView
>(
R
.
id
.
label_tv
).
text
=
if
(
vedioBean
?.
completeStatus
==
0
)
"已完结"
else
"更新中"
initVp
()
}
private
fun
initVp
()
{
if
(
vedioBean
==
null
)
return
for
(
i
in
0
until
vedioBean
.
vedioTotal
)
{
if
(
data
[
i
].
type
==
VEDIO3DOS_FREE
)
{
var
playing
=
false
if
(
vedioBean
.
seeIndex
==
i
)
{
playing
=
true
}
mData
.
add
(
EpisodeBean
(
false
,
playing
,
""
+
(
i
+
1
)))
}
else
{
mData
.
add
(
EpisodeBean
(
lock
=
true
,
playing
=
false
,
title
=
""
+
(
i
+
1
)))
}
}
val
subList
=
CommonUtils
.
getSubList
(
30
,
mData
)
adapter
=
VideoEpisodeAdapter
()
adapter
?.
setNewInstance
(
subList
)
vp2
.
adapter
=
adapter
TabLayoutMediator
(
tab
,
vp2
)
{
tab
,
position
->
// 初始化Tab
tab
.
id
=
position
tab
.
customView
=
getTabView
(
subList
[
position
][
0
].
title
+
"-"
+
subList
[
position
][
subList
[
position
].
size
-
1
].
title
,
position
)
}.
attach
()
tab
.
addOnTabSelectedListener
(
object
:
TabLayout
.
OnTabSelectedListener
{
override
fun
onTabSelected
(
tab
:
TabLayout
.
Tab
?)
{
updateTab
(
tab
,
true
)
}
override
fun
onTabUnselected
(
tab
:
TabLayout
.
Tab
?)
{
updateTab
(
tab
,
false
)
}
override
fun
onTabReselected
(
tab
:
TabLayout
.
Tab
?)
{
}
})
if
(
mRealSeeIndex
==
0
)
{
tab
.
getTabAt
(
vedioBean
.
seeIndex
/
30
)
?.
select
()
}
else
{
tab
.
getTabAt
(
mRealSeeIndex
/
30
)
?.
select
()
}
}
private
fun
getTabView
(
text
:
String
,
position
:
Int
):
View
{
val
view
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
item_epsiode_tab
,
null
)
val
viewText
=
view
.
findViewById
<
TextView
>(
R
.
id
.
item_tv
)
viewText
.
text
=
text
return
view
}
private
fun
updateTab
(
tab
:
TabLayout
.
Tab
?,
isSelected
:
Boolean
)
{
tab
?.
customView
?.
let
{
val
text
=
it
.
findViewById
<
TextView
>(
R
.
id
.
item_tv
)
if
(
isSelected
)
{
text
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
red
))
}
else
{
text
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
black
))
}
}
}
fun
changeLockStatus
(
unlockIndex
:
Int
)
{
for
(
i
in
0
until
mData
.
size
)
{
mData
[
i
].
lock
=
i
>
unlockIndex
}
adapter
?.
notifyDataSetChanged
()
}
fun
setCurrentIndex
(
position
:
Int
)
{
mRealSeeIndex
=
position
for
(
mDatum
in
mData
)
{
mDatum
.
playing
=
false
}
if
(
mData
.
size
>
position
)
{
mData
[
position
].
playing
=
true
adapter
?.
notifyDataSetChanged
()
}
}
private
var
mOnEpisodeClickListener
:
VideoEpisodeAdapter
.
OnEpisodeClickListener
?
=
null
fun
setOnEpisodeClickListener
(
onEpisodeClickListener
:
VideoEpisodeAdapter
.
OnEpisodeClickListener
)
{
mOnEpisodeClickListener
=
onEpisodeClickListener
adapter
?.
setOnEpisodeClickListener
(
mOnEpisodeClickListener
)
}
}
\ No newline at end of file
video/app/src/main/java/com/mints/helivideo/video/tx/newrecommend/NewSuperShortVideoView.java
0 → 100644
View file @
9a1ff634
This diff is collapsed.
Click to expand it.
video/app/src/main/java/com/mints/helivideo/video/tx/NewTxVideoActivity.kt
→
video/app/src/main/java/com/mints/helivideo/video/tx/
newrecommend/
NewTxVideoActivity.kt
View file @
9a1ff634
This diff is collapsed.
Click to expand it.
video/app/src/main/java/com/mints/helivideo/video/tx/newrecommend/NewTxVideoAdapter.kt
0 → 100755
View file @
9a1ff634
This diff is collapsed.
Click to expand it.
video/app/src/main/res/layout/activity_new_tx_video.xml
View file @
9a1ff634
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/black"
android:orientation=
"vertical"
>
<com.mints.helivideo.video.tx.SuperShortVideoView
android:id=
"@+id/super_short_video_view"
<com.mints.helivideo.video.tx.
newrecommend.New
SuperShortVideoView
android:id=
"@+id/
new_
super_short_video_view"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
...
...
@@ -59,16 +58,17 @@
</LinearLayout>
</FrameLayout>
<LinearLayout
android:id=
"@+id/ll_lucky"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"1dp"
android:visibility=
"gone"
android:layout_gravity=
"bottom|right"
android:layout_marginEnd=
"1dp"
android:layout_marginBottom=
"220dp"
android:gravity=
"center"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
android:visibility=
"gone"
>
<ImageView
android:id=
"@+id/iv_lucky_gif"
...
...
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