Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomsh committed Jul 4, 2019
1 parent 67b9c19 commit c90d289
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LibBanner/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ publish {
userOrg = 'songwenchao0714'
groupId = 'com.ms'
artifactId = 'Banner'
publishVersion = '2.3.15'
publishVersion = '2.3.16'
desc = 'A simple banner lib'
website = 'https://github.com/wenchaosong/Banner'
}
2 changes: 2 additions & 0 deletions LibBanner/src/main/java/com/ms/banner/Banner.java
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@ public boolean dispatchTouchEvent(MotionEvent ev) {
private int toRealPosition(int position) {
//int realPosition = (position - 1) % count;
int realPosition;
if (count <= 0)
return 0;
if (isLoop) {
realPosition = (position - 1 + count) % count;
} else {
Expand Down
2 changes: 1 addition & 1 deletion LibBannerAndroidx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ publish {
userOrg = 'songwenchao0714'
groupId = 'com.ms'
artifactId = 'Banner-androidx'
publishVersion = '2.3.15'
publishVersion = '2.3.16'
desc = 'A simple banner lib'
website = 'https://github.com/wenchaosong/Banner'
}
2 changes: 2 additions & 0 deletions LibBannerAndroidx/src/main/java/com/ms/banner/Banner.java
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,8 @@ public boolean dispatchTouchEvent(MotionEvent ev) {
private int toRealPosition(int position) {
//int realPosition = (position - 1) % count;
int realPosition;
if (count <= 0)
return 0;
if (isLoop) {
realPosition = (position - 1 + count) % count;
} else {
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
#### Step 1.依赖banner
```
dependencies{
implementation 'com.ms:Banner:2.3.15'
implementation 'com.ms:Banner-androidx:2.3.15'
implementation 'com.ms:Banner:2.3.16'
implementation 'com.ms:Banner-androidx:2.3.16'
}
```
或者引用本地lib
Expand Down

0 comments on commit c90d289

Please sign in to comment.