Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
I
ImageVideoBanner
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangjiantao
ImageVideoBanner
Commits
90f4d8a6
Commit
90f4d8a6
authored
Nov 04, 2020
by
gaodapeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加了replaceData返回是否有变化的值
parent
d42d7239
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ImageVideoBanner.java
...rc/main/java/com/widget/imagebanner/ImageVideoBanner.java
+4
-4
No files found.
banner/src/main/java/com/widget/imagebanner/ImageVideoBanner.java
View file @
90f4d8a6
...
...
@@ -85,8 +85,8 @@ public class ImageVideoBanner extends FrameLayout implements ViewPager.OnPageCha
}
public
void
replaceData
(
List
<
BannerBean
>
listBean
)
{
mAdapter
.
replaceData
(
listBean
);
public
boolean
replaceData
(
List
<
BannerBean
>
listBean
)
{
return
mAdapter
.
replaceData
(
listBean
);
}
public
void
addData
(
List
<
BannerBean
>
listBean
)
{
...
...
@@ -292,13 +292,12 @@ public class ImageVideoBanner extends FrameLayout implements ViewPager.OnPageCha
return
super
.
getItemPosition
(
object
);
}
public
void
replaceData
(
List
<
BannerBean
>
listBean
)
{
public
boolean
replaceData
(
List
<
BannerBean
>
listBean
)
{
// 新数据和原来数据对比,不一致才去刷新
boolean
change
=
compareData
(
listBean
);
if
(!
change
)
{
notifyDataSetChanged
();
// startBanner();
return
;
}
if
(
null
!=
listBean
)
{
mList
.
clear
();
...
...
@@ -310,6 +309,7 @@ public class ImageVideoBanner extends FrameLayout implements ViewPager.OnPageCha
autoCurrIndex
=
0
;
// startBanner();
}
return
change
;
}
...
...
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