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
ed40ff6f
Commit
ed40ff6f
authored
Jul 11, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
4aaa457d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
66 additions
and
26 deletions
+66
-26
HotStyleListBean.kt
.../java/com/mints/wisdomclean/mvp/model/HotStyleListBean.kt
+1
-0
VedioBean.java
.../main/java/com/mints/wisdomclean/mvp/model/VedioBean.java
+36
-1
PicContentPresenter.kt
...m/mints/wisdomclean/mvp/presenters/PicContentPresenter.kt
+2
-2
HomeVideoPageAdapter.kt
.../com/mints/wisdomclean/ui/adapter/HomeVideoPageAdapter.kt
+1
-1
TopAdapter.kt
.../main/java/com/mints/wisdomclean/ui/adapter/TopAdapter.kt
+1
-1
MainFragment.kt
...in/java/com/mints/wisdomclean/ui/fragment/MainFragment.kt
+21
-17
MovieFragment.kt
...n/java/com/mints/wisdomclean/ui/fragment/MovieFragment.kt
+4
-4
No files found.
video/app/src/main/java/com/mints/wisdomclean/mvp/model/HotStyleListBean.kt
View file @
ed40ff6f
...
@@ -17,6 +17,7 @@ data class HotStyleTypesList(
...
@@ -17,6 +17,7 @@ data class HotStyleTypesList(
@Parcelize
@Parcelize
data class
HotStyleTypesBean
(
data class
HotStyleTypesBean
(
var
type
:
String
=
""
,
var
type
:
String
=
""
,
var
typeId
:
Int
=
0
,
var
torder
:
Int
=
0
var
torder
:
Int
=
0
)
:
Parcelable
)
:
Parcelable
video/app/src/main/java/com/mints/wisdomclean/mvp/model/VedioBean.java
View file @
ed40ff6f
...
@@ -12,13 +12,16 @@ public class VedioBean implements Serializable {
...
@@ -12,13 +12,16 @@ public class VedioBean implements Serializable {
private
String
topTabsReamrk
;
private
String
topTabsReamrk
;
private
ArrayList
<
String
>
orderTags
;
//标签
private
ArrayList
<
String
>
orderTags
;
//标签
private
int
vedioTotal
;
//同穿山甲 total
private
int
vedioTotal
;
//同穿山甲 total
private
int
unlockIndex
;
//解锁剧集
private
int
seeIndex
;
//看到哪一集了
private
int
collect
;
//0未收藏,1收藏
private
String
vedioDesc
;
private
String
vedioDesc
;
private
String
coverImage
;
private
String
coverImage
;
private
int
completeStatus
;
//完结状态 同穿山接status 0-完结
private
int
completeStatus
;
//完结状态 同穿山接status 0-完结
private
String
scriptName
;
private
String
scriptName
;
private
String
scriptAuthor
;
private
String
scriptAuthor
;
private
int
vedioId
;
// 视频id,服务器标识
private
int
vedioId
;
// 视频id,服务器标识
private
int
hot
;
// 播放量
public
String
getThirdId
()
{
public
String
getThirdId
()
{
return
thirdId
;
return
thirdId
;
}
}
...
@@ -122,4 +125,36 @@ public class VedioBean implements Serializable {
...
@@ -122,4 +125,36 @@ public class VedioBean implements Serializable {
public
void
setVedioId
(
int
vedioId
)
{
public
void
setVedioId
(
int
vedioId
)
{
this
.
vedioId
=
vedioId
;
this
.
vedioId
=
vedioId
;
}
}
public
int
getUnlockIndex
()
{
return
unlockIndex
;
}
public
void
setUnlockIndex
(
int
unlockIndex
)
{
this
.
unlockIndex
=
unlockIndex
;
}
public
int
getSeeIndex
()
{
return
seeIndex
;
}
public
void
setSeeIndex
(
int
seeIndex
)
{
this
.
seeIndex
=
seeIndex
;
}
public
int
getCollect
()
{
return
collect
;
}
public
void
setCollect
(
int
collect
)
{
this
.
collect
=
collect
;
}
public
int
getHot
()
{
return
hot
;
}
public
void
setHot
(
int
hot
)
{
this
.
hot
=
hot
;
}
}
}
video/app/src/main/java/com/mints/wisdomclean/mvp/presenters/PicContentPresenter.kt
View file @
ed40ff6f
...
@@ -9,9 +9,9 @@ import com.mints.wisdomclean.mvp.model.BannerList
...
@@ -9,9 +9,9 @@ import com.mints.wisdomclean.mvp.model.BannerList
class
PicContentPresenter
:
BasePresenter
<
PicContentView
>()
{
class
PicContentPresenter
:
BasePresenter
<
PicContentView
>()
{
fun
getHomePageImageList
(
type
:
String
,
page
:
Int
,
pageCount
:
Int
)
{
fun
getHomePageImageList
(
type
Id
:
Int
,
page
:
Int
,
pageCount
:
Int
)
{
val
vo
=
hashMapOf
<
String
,
Any
>()
val
vo
=
hashMapOf
<
String
,
Any
>()
vo
[
"type
"
]
=
type
vo
[
"type
Id"
]
=
typeId
vo
[
"page"
]
=
page
vo
[
"page"
]
=
page
vo
[
"size"
]
=
pageCount
vo
[
"size"
]
=
pageCount
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/adapter/HomeVideoPageAdapter.kt
View file @
ed40ff6f
...
@@ -23,7 +23,7 @@ class HomeVideoPageAdapter(
...
@@ -23,7 +23,7 @@ class HomeVideoPageAdapter(
val
fragment
=
fragments
[
position
]
val
fragment
=
fragments
[
position
]
if
(
fragment
!=
null
)
return
fragment
if
(
fragment
!=
null
)
return
fragment
val
newFragment
=
MovieFragment
.
newInstance
(
data
[
position
].
type
,
position
)
val
newFragment
=
MovieFragment
.
newInstance
(
data
[
position
].
type
Id
,
position
)
fragments
[
position
]
=
newFragment
fragments
[
position
]
=
newFragment
return
newFragment
return
newFragment
}
}
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/adapter/TopAdapter.kt
View file @
ed40ff6f
...
@@ -39,6 +39,7 @@ class TopAdapter(val topList: MutableList<VedioBean>?) :
...
@@ -39,6 +39,7 @@ class TopAdapter(val topList: MutableList<VedioBean>?) :
val
topBean
=
topList
?.
get
(
position
)
val
topBean
=
topList
?.
get
(
position
)
if
(
topBean
!=
null
)
{
if
(
topBean
!=
null
)
{
holder
.
tvTopItemLable
.
text
=
"${position + 1}"
holder
.
tvTopItemLable
.
text
=
"${position + 1}"
holder
.
tvTopItemCount
.
text
=
"${topBean.playCount}万"
holder
.
tvTopItemTitle
.
text
=
"${topBean.title}"
holder
.
tvTopItemTitle
.
text
=
"${topBean.title}"
if
(
topBean
.
orderTags
!=
null
&&
topBean
.
orderTags
.
size
>
0
)
{
if
(
topBean
.
orderTags
!=
null
&&
topBean
.
orderTags
.
size
>
0
)
{
val
sb
=
StringBuilder
()
val
sb
=
StringBuilder
()
...
@@ -55,7 +56,6 @@ class TopAdapter(val topList: MutableList<VedioBean>?) :
...
@@ -55,7 +56,6 @@ class TopAdapter(val topList: MutableList<VedioBean>?) :
)
)
}
}
when
(
position
)
{
when
(
position
)
{
0
->
{
0
->
{
holder
.
tvTopItemLable
.
setBackgroundResource
(
R
.
mipmap
.
y43
)
holder
.
tvTopItemLable
.
setBackgroundResource
(
R
.
mipmap
.
y43
)
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/fragment/MainFragment.kt
View file @
ed40ff6f
...
@@ -201,24 +201,28 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
...
@@ -201,24 +201,28 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
}
fun
setWatchingStatus
()
{
fun
setWatchingStatus
()
{
// if (LocalVedioManager.isCacheVedio()) {
if
(
LocalVedioManager
.
isCacheVedio
())
{
ll_main_watching_root
.
visibility
=
View
.
VISIBLE
ll_main_watching_root
.
visibility
=
View
.
VISIBLE
val
cacheVedio
=
LocalVedioManager
.
getCacheVedio
()
val
cacheVedio
=
LocalVedioManager
.
getCacheVedio
()
if
(
cacheVedio
!=
null
)
{
if
(
cacheVedio
!=
null
)
{
GlideUtils
.
loadImageViewGifForFitCenter
(
requireContext
(),
cacheVedio
.
coverImage
,
iv_main_watching_pic
)
tv_main_watching_name
.
text
=
cacheVedio
.
title
tv_main_watching_text1
.
text
=
"上次观看至第${cacheVedio.completeStatus}集"
if
(
cacheVedio
.
orderTags
!=
null
&&
cacheVedio
.
orderTags
.
size
>
0
)
{
val
sb
=
StringBuilder
()
for
(
i
in
0
until
cacheVedio
.
orderTags
.
size
)
{
sb
.
append
(
cacheVedio
.
orderTags
.
get
(
i
)
+
" "
)
}
tv_main_watching_text2
.
text
=
"${sb}"
}
}
}
else
{
ll_main_watching_root
.
visibility
=
View
.
GONE
}
}
GlideUtils
.
loadImageViewGifForFitCenter
(
requireContext
(),
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg-bcurd/img/bg_vip_top1.png"
,
iv_main_watching_pic
)
// tv_main_watching_name.text=""
// tv_main_watching_text1.text=""
// tv_main_watching_text2.text=""
// } else {
// ll_main_watching_root.visibility = View.GONE
// }
}
}
override
fun
getHomeV1MsgSuc
(
data
:
HotStyleTypesList
)
{
override
fun
getHomeV1MsgSuc
(
data
:
HotStyleTypesList
)
{
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/fragment/MovieFragment.kt
View file @
ed40ff6f
...
@@ -20,16 +20,16 @@ import java.util.*
...
@@ -20,16 +20,16 @@ import java.util.*
class
MovieFragment
:
LazyLoadBaseFragment
(),
PicContentView
,
OnLoadMoreListener
{
class
MovieFragment
:
LazyLoadBaseFragment
(),
PicContentView
,
OnLoadMoreListener
{
private
var
mType
=
""
private
var
mType
=
0
private
var
mPosition
=
0
// 首页-第一个tab-第一个recyclerview Item
private
var
mPosition
=
0
// 首页-第一个tab-第一个recyclerview Item
companion
object
{
companion
object
{
private
const
val
VIDEO_TYPE
=
"VIDEO_TYPE"
private
const
val
VIDEO_TYPE
=
"VIDEO_TYPE"
private
const
val
VIDEO_POSITION
=
"VIDEO_POSITION"
private
const
val
VIDEO_POSITION
=
"VIDEO_POSITION"
fun
newInstance
(
type
:
String
,
position
:
Int
):
Fragment
{
fun
newInstance
(
type
:
Int
,
position
:
Int
):
Fragment
{
val
args
=
Bundle
()
val
args
=
Bundle
()
args
.
put
String
(
VIDEO_TYPE
,
type
)
args
.
put
Int
(
VIDEO_TYPE
,
type
)
args
.
putInt
(
VIDEO_POSITION
,
position
)
args
.
putInt
(
VIDEO_POSITION
,
position
)
val
fragment
=
MovieFragment
()
val
fragment
=
MovieFragment
()
fragment
.
arguments
=
args
fragment
.
arguments
=
args
...
@@ -48,7 +48,7 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
...
@@ -48,7 +48,7 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
arguments
?.
let
{
arguments
?.
let
{
mType
=
it
.
get
String
(
VIDEO_TYPE
,
mType
)
mType
=
it
.
get
Int
(
VIDEO_TYPE
,
mType
)
mPosition
=
it
.
getInt
(
VIDEO_POSITION
,
mPosition
)
mPosition
=
it
.
getInt
(
VIDEO_POSITION
,
mPosition
)
}
}
}
}
...
...
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