From f4c88f060da700d20207027135b70cd12aa42f9f Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Mon, 15 Feb 2016 19:45:43 +0100 Subject: [PATCH 1/3] * fix wrong items used in sample --- .../mikepenz/fastadapter/app/AdvancedSampleActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/mikepenz/fastadapter/app/AdvancedSampleActivity.java b/app/src/main/java/com/mikepenz/fastadapter/app/AdvancedSampleActivity.java index ffebca62f..82d9155c3 100755 --- a/app/src/main/java/com/mikepenz/fastadapter/app/AdvancedSampleActivity.java +++ b/app/src/main/java/com/mikepenz/fastadapter/app/AdvancedSampleActivity.java @@ -43,7 +43,7 @@ public class AdvancedSampleActivity extends AppCompatActivity { //save our FastAdapter private FastAdapter mFastAdapter; private HeaderAdapter mHeaderAdapter; - private ItemAdapter mItemAdapter; + private ItemAdapter mItemAdapter; private ActionModeHelper mActionModeHelper; @@ -147,7 +147,7 @@ public void onChanged() { private void setItems() { mHeaderAdapter.add(new SampleItem().withName("Header").withSelectable(false).withIdentifier(1)); //fill with some sample data - List items = new ArrayList<>(); + List items = new ArrayList<>(); int size = new Random().nextInt(25) + 10; for (int i = 1; i <= size; i++) { @@ -168,7 +168,7 @@ private void setItems() { expandableItem.withSubItems(subItems); items.add(expandableItem); } else { - items.add(new ExpandableItem().withName("Test " + i).withHeader(headers[i / 5])); + items.add(new SampleItem().withName("Test " + i).withHeader(headers[i / 5])); } } mItemAdapter.set(items); From 504691d565dcaaf4dc3b87973d3d3cdb975baf4b Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Mon, 15 Feb 2016 19:46:17 +0100 Subject: [PATCH 2/3] * create new list inside `setNewList` to prevent devs to alter the list inside their app, as this will cause inconsistent states inside the adapter --- .../java/com/mikepenz/fastadapter/adapters/ItemAdapter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/src/main/java/com/mikepenz/fastadapter/adapters/ItemAdapter.java b/library/src/main/java/com/mikepenz/fastadapter/adapters/ItemAdapter.java index d34bb68e6..65f97a00d 100644 --- a/library/src/main/java/com/mikepenz/fastadapter/adapters/ItemAdapter.java +++ b/library/src/main/java/com/mikepenz/fastadapter/adapters/ItemAdapter.java @@ -201,8 +201,8 @@ public void setNewList(List items) { if (mUseIdDistributor) { IdDistributor.checkIds(items); } - mItems = items; - mapPossibleTypes(items); + mItems = new ArrayList<>(items); + mapPossibleTypes(mItems); getFastAdapter().notifyAdapterDataSetChanged(); } From 54d01c4ba85172387c98dd9285ec8a847b7c0d0c Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Mon, 15 Feb 2016 19:46:54 +0100 Subject: [PATCH 3/3] * [release] v1.0.6 --- README.md | 2 +- app/build.gradle | 4 ++-- gradle.properties | 4 ++-- library/build.gradle | 4 ++-- library/src/main/res/values/library_fastadapter_strings.xml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e5982bb7b..07c7508a8 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ You can try it out here [Google Play](https://play.google.com/store/apps/details #Include in your project ##Using Maven ```javascript -compile('com.mikepenz:fastadapter:1.0.5@aar') { +compile('com.mikepenz:fastadapter:1.0.6@aar') { transitive = true } ``` diff --git a/app/build.gradle b/app/build.gradle index 9142bd7fc..5d8ce7977 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,8 +12,8 @@ android { defaultConfig { minSdkVersion 11 targetSdkVersion 23 - versionCode 105 - versionName '1.0.5' + versionCode 106 + versionName '1.0.6' applicationVariants.all { variant -> variant.outputs.each { output -> diff --git a/gradle.properties b/gradle.properties index c17ab15e2..61f091f2d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ # Maven stuff -VERSION_NAME=1.0.5 -VERSION_CODE=105 +VERSION_NAME=1.0.6 +VERSION_CODE=106 GROUP=com.mikepenz POM_DESCRIPTION=FastAdapter Library diff --git a/library/build.gradle b/library/build.gradle index 5c35b321c..9c75f2ef0 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -8,8 +8,8 @@ android { defaultConfig { minSdkVersion 10 targetSdkVersion 23 - versionCode 105 - versionName '1.0.5' + versionCode 106 + versionName '1.0.6' } buildTypes { release { diff --git a/library/src/main/res/values/library_fastadapter_strings.xml b/library/src/main/res/values/library_fastadapter_strings.xml index 69bd01f47..d4ea00f3a 100755 --- a/library/src/main/res/values/library_fastadapter_strings.xml +++ b/library/src/main/res/values/library_fastadapter_strings.xml @@ -10,7 +10,7 @@ FastAdapter, the bullet proof, fast and easy to use adapter library, which minimizes developing time to a fraction... ]]> - 1.0.5 + 1.0.6 https://github.com/mikepenz/FastAdapter apache_2_0 true