From eb909782625165c63e8c2e0ae2d45fdb61ab0842 Mon Sep 17 00:00:00 2001 From: zeropercenthappy Date: Fri, 8 Dec 2017 11:11:58 +0800 Subject: [PATCH] release 1.0.2 fix: full selected right margin --- library/build.gradle | 4 ++-- .../com/zeropercenthappy/ratingbarlibrary/ZPHRatingBar.java | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) 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);