diff --git a/library/build.gradle b/library/build.gradle index 78a8ef9..a24ee1a 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -10,8 +10,8 @@ android { defaultConfig { minSdkVersion 16 targetSdkVersion 26 - versionCode 2 - versionName "1.0.1" + versionCode 3 + versionName "1.0.2" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" diff --git a/library/src/main/java/com/zeropercenthappy/ratingbarlibrary/ZPHRatingBar.java b/library/src/main/java/com/zeropercenthappy/ratingbarlibrary/ZPHRatingBar.java index bb77496..83127af 100644 --- a/library/src/main/java/com/zeropercenthappy/ratingbarlibrary/ZPHRatingBar.java +++ b/library/src/main/java/com/zeropercenthappy/ratingbarlibrary/ZPHRatingBar.java @@ -96,6 +96,9 @@ private void initView() { if (i == 0) { //第一个item imageView = createImageView(true, 0); + } else if (i == itemCountNumber - 1 && itemSelectedNumber == itemCountNumber) { + //最后一个item为已选中 + imageView = createImageView(true, 2); } else { //中间的item imageView = createImageView(true, 1);