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
94cabbbf
Commit
94cabbbf
authored
Aug 04, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
b8430428
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
MainExpressManager.kt
...java/com/mints/helivideo/ad/express/MainExpressManager.kt
+1
-1
MovieFragment.kt
...ain/java/com/mints/helivideo/ui/fragment/MovieFragment.kt
+5
-4
No files found.
video/app/src/main/java/com/mints/helivideo/ad/express/MainExpressManager.kt
View file @
94cabbbf
...
...
@@ -55,7 +55,7 @@ class MainExpressManager {
UIUtils
.
getAdWidth3
(
MintsApplication
.
getContext
()).
toInt
(),
UIUtils
.
dip2px
(
MintsApplication
.
getContext
(),
192f
)
)
.
setAdCount
(
3
)
//请求广告数量为1到3条 (优先采用平台配置的数量)
.
setAdCount
(
2
)
//请求广告数量为1到3条 (优先采用平台配置的数量)
.
build
()
adNativeLoader
.
loadFeedAd
(
adslot
,
object
:
TTAdNative
.
FeedAdListener
{
...
...
video/app/src/main/java/com/mints/helivideo/ui/fragment/MovieFragment.kt
View file @
94cabbbf
...
...
@@ -18,6 +18,7 @@ import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener
import
com.mints.helivideo.common.AppConfig
import
com.mints.helivideo.ui.adapter.NewHotStyle2Adapter
import
com.mints.helivideo.ui.widgets.MyGridLayoutManager
import
com.mints.helivideo.utils.LogUtil
import
kotlinx.android.synthetic.main.fragment_movie.*
class
MovieFragment
:
LazyLoadBaseFragment
(),
PicContentView
,
OnLoadMoreListener
{
...
...
@@ -84,7 +85,6 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
override
fun
onLoadMore
(
refreshLayout
:
RefreshLayout
)
{
hotPage
=
++
hotPage
loadAd
()
picContentPresenter
.
getHomePageImageList
(
mType
,
hotPage
,
Constant
.
PAGE_SIZE
)
}
...
...
@@ -102,6 +102,7 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
if
(
data
.
list
.
size
<
Constant
.
PAGE_SIZE
)
{
srlMainPage
.
finishLoadMoreWithNoMoreData
()
}
else
{
loadAd
()
srlMainPage
.
finishLoadMore
()
}
hotStyleAdapter
.
addData
(
getAdapterData
(
data
.
list
))
...
...
@@ -164,13 +165,13 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
var
insertIndex
=
3
val
itemEntity3s
=
hotStyleAdapter
.
data
for
(
i
in
0
until
itemEntity3s
.
size
)
{
for
(
i
in
itemEntity3s
.
size
-
1
downTo
0
)
{
if
(
itemEntity3s
[
i
].
itemType
==
MULTI_ITEM_3
)
{
insertIndex
+=
4
}
}
if
(
insertIndex
>=
itemEntity3s
.
size
-
1
)
{
insertIndex
=
itemEntity3s
.
size
-
1
if
(
insertIndex
>=
itemEntity3s
.
size
)
{
insertIndex
=
itemEntity3s
.
size
}
val
data
=
VideoMultiItemEntity3
(
MULTI_ITEM_3
,
null
,
adView
)
...
...
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