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
47a250d4
Commit
47a250d4
authored
Aug 10, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
286dddb1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
32 deletions
+39
-32
TxVideoAdapter.kt
...va/com/mints/helivideo/video/tx/adapter/TxVideoAdapter.kt
+39
-32
No files found.
video/app/src/main/java/com/mints/helivideo/video/tx/adapter/TxVideoAdapter.kt
View file @
47a250d4
...
...
@@ -92,49 +92,56 @@ class TxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity, BaseViewH
}
vedioBean
?.
let
{
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
String
.
format
(
"解锁%s·第%d-%d集"
,
it
.
title
,
it
.
unlockIndex
+
1
,
it
.
unlockIndex
+
it
.
adGiveVedioNum
)
holder
.
getView
<
TextView
>(
R
.
id
.
tv_info
).
text
=
String
.
format
(
"看激励视频解锁%d集剧情\n请按照顺序解锁"
,
it
.
adGiveVedioNum
)
if
(
it
.
isRecommendVedio
)
{
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
String
.
format
(
"解锁%s·全集"
,
it
.
title
)
holder
.
getView
<
TextView
>(
R
.
id
.
tv_info
).
text
=
String
.
format
(
"0.01元解锁全部短剧"
)
}
else
{
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
String
.
format
(
"解锁%s·第%d-%d集"
,
it
.
title
,
it
.
unlockIndex
+
1
,
it
.
unlockIndex
+
it
.
adGiveVedioNum
)
holder
.
getView
<
TextView
>(
R
.
id
.
tv_info
).
text
=
String
.
format
(
"看激励视频解锁%d集剧情\n请按照顺序解锁"
,
it
.
adGiveVedioNum
)
}
holder
.
getView
<
TextView
>(
R
.
id
.
unlock
).
text
=
String
.
format
(
"查看激励视频"
)
holder
.
getView
<
View
>(
R
.
id
.
unlock
).
setOnClickListener
{
it2
->
mOnCustomChildClickListener
?.
onCustomChildClick
(
it2
,
holder
.
adapterPosition
)
}
}
ExpressManager
.
instance
.
getAdView
(
object
:
ExpressAdCallback
{
override
fun
loadSuccess
(
adView
:
FrameLayout
?)
{
adView
?.
let
{
UIUtils
.
removeFromParent
(
it
)
val
fmAd
=
holder
.
getView
<
FrameLayout
>(
R
.
id
.
fl_ad
)
fmAd
.
removeAllViews
()
fmAd
.
addView
(
it
)
ExpressManager
.
instance
.
getAdView
(
object
:
ExpressAdCallback
{
override
fun
loadSuccess
(
adView
:
FrameLayout
?)
{
adView
?.
let
{
UIUtils
.
removeFromParent
(
it
)
val
fmAd
=
holder
.
getView
<
FrameLayout
>(
R
.
id
.
fl_ad
)
fmAd
.
removeAllViews
()
fmAd
.
addView
(
it
)
}
ExpressManager
.
instance
.
preLoadAd
()
}
ExpressManager
.
instance
.
preLoadAd
()
}
override
fun
renderSuccess
(
adView
:
FrameLayout
?):
Boolean
{
adView
?.
let
{
UIUtils
.
removeFromParent
(
it
)
val
fmAd
=
holder
.
getView
<
FrameLayout
>(
R
.
id
.
fl_ad
)
fmAd
.
removeAllViews
()
fmAd
.
addView
(
it
)
}
override
fun
renderSuccess
(
adView
:
FrameLayout
?):
Boolean
{
adView
?.
let
{
UIUtils
.
removeFromParent
(
it
)
val
fmAd
=
holder
.
getView
<
FrameLayout
>(
R
.
id
.
fl_ad
)
fmAd
.
removeAllViews
()
fmAd
.
addView
(
it
)
ExpressManager
.
instance
.
preLoadAd
()
return
false
}
ExpressManager
.
instance
.
preLoadAd
()
return
false
}
override
fun
loadFail
()
{
}
})
override
fun
loadFail
()
{
}
})
}
private
fun
initVideoHolder
(
holder
:
BaseViewHolder
,
item
:
IndexList
.
VedioEpisodeBean
?)
{
...
...
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