Skip to content

Commit

Permalink
优化,发布新版本
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomsh committed Mar 12, 2019
1 parent eba3b2a commit dc88137
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repositories {
}
dependencies{
implementation 'com.github.wenchaosong:Banner:2.3.1'
implementation 'com.github.wenchaosong:Banner:2.3.2'
}
```
或者引用本地lib
Expand Down
6 changes: 4 additions & 2 deletions rollbanner/src/main/java/com/ms/banner/Banner.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
Expand Down Expand Up @@ -251,7 +250,10 @@ public void update(List<?> imageUrls, List<String> titles) {
update(imageUrls);
}

public void update(@NonNull List<?> imageUrls) {
public void update(List<?> imageUrls) {
if (imageUrls == null) {
imageUrls = new ArrayList<>();
}
if (imageUrls.size() == 0) {
bannerDefaultImage.setVisibility(VISIBLE);
this.mDatas.clear();
Expand Down

0 comments on commit dc88137

Please sign in to comment.