diff --git a/CHANGELOG.md b/CHANGELOG.md
index 83e477b2..a9b43d8b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,6 @@
# CHANGELOG
-# 1.0.6
+# 1.0.6 - 1.0.7
Fixed bug related with [issue #7](https://github.com/pchmn/MaterialChipsInput/issues/7)
diff --git a/README.md b/README.md
index 802b40a2..88030efb 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ Implementation of Material Design [Chips](https://material.io/guidelines/compone
## Demo
-[Download sample-v1.0.6.apk](https://github.com/pchmn/MaterialChipsInput/raw/master/docs/material-chips-input-sample-v1.0.6.apk)
+[Download sample-v1.0.7.apk](https://github.com/pchmn/MaterialChipsInput/raw/master/docs/material-chips-input-sample-v1.0.7.apk)
## Setup
@@ -26,7 +26,7 @@ allprojects {
In your app level build.gradle :
```java
dependencies {
- compile 'com.github.pchmn:MaterialChipsInput:1.0.6'
+ compile 'com.github.pchmn:MaterialChipsInput:1.0.7'
}
```
diff --git a/docs/material-chips-input-sample-v1.0.7.apk b/docs/material-chips-input-sample-v1.0.7.apk
new file mode 100644
index 00000000..9c2bdef9
Binary files /dev/null and b/docs/material-chips-input-sample-v1.0.7.apk differ
diff --git a/library/build.gradle b/library/build.gradle
index 7bdbca9c..b2304366 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 25
- versionCode 5
- versionName "1.0.4"
+ versionCode 8
+ versionName "1.0.7"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
diff --git a/library/src/main/java/com/pchmn/materialchips/adapter/FilterableAdapter.java b/library/src/main/java/com/pchmn/materialchips/adapter/FilterableAdapter.java
index 90d536c6..5fd1273f 100644
--- a/library/src/main/java/com/pchmn/materialchips/adapter/FilterableAdapter.java
+++ b/library/src/main/java/com/pchmn/materialchips/adapter/FilterableAdapter.java
@@ -25,6 +25,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
+import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
@@ -71,11 +72,10 @@ public int compare(ChipInterface o1, ChipInterface o2) {
}
};
// remove chips that do not have label
- int count = 0;
- for(ChipInterface chipInterface: chipList) {
- if(chipInterface.getLabel() == null)
- chipList.remove(count);
- count++;
+ Iterator extends ChipInterface> iterator = chipList.iterator();
+ while(iterator.hasNext()) {
+ if(iterator.next().getLabel() == null)
+ iterator.remove();
}
sortList(chipList);
mOriginalList.addAll(chipList);
diff --git a/sample/build.gradle b/sample/build.gradle
index b56930e6..fea8abd1 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -9,8 +9,8 @@ android {
applicationId "com.pchmn.sample.materialchipsinput"
minSdkVersion 15
targetSdkVersion 25
- versionCode 5
- versionName "1.0.4"
+ versionCode 8
+ versionName "1.0.7"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {