Skip to content

Commit

Permalink
Merge branch 'release/v0.9.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Jan 24, 2016
2 parents 536acae + 066bcb2 commit cf4a05b
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,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:0.9.3@aar') {
compile('com.mikepenz:fastadapter:0.9.4@aar') {
transitive = true
}
```
Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
defaultConfig {
minSdkVersion 11
targetSdkVersion 23
versionCode 93
versionName '0.9.3'
versionCode 94
versionName '0.9.4'

applicationVariants.all { variant ->
variant.outputs.each { output ->
Expand Down Expand Up @@ -52,13 +52,13 @@ dependencies {

//used to generate the drawer on the left
//https://github.com/mikepenz/MaterialDrawer
compile('com.mikepenz:materialdrawer:5.0.0.fastAdapter.b12-SNAPSHOT@aar') {
compile('com.mikepenz:materialdrawer:5.0.0.fastAdapter.b14-SNAPSHOT@aar') {
transitive = true
exclude module: "fastadapter"
}
//used to provide different itemAnimators for the RecyclerView
//https://github.com/mikepenz/ItemAnimators
compile 'com.mikepenz:itemanimators:0.2.0-SNAPSHOT@aar'
compile 'com.mikepenz:itemanimators:0.2.1@aar'
//used to generate the Open Source section
//https://github.com/mikepenz/AboutLibraries
compile('com.mikepenz:aboutlibraries:5.3.6@aar') {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-alpha5'
classpath 'com.android.tools.build:gradle:2.0.0-alpha7'
classpath 'com.novoda:bintray-release:0.3.4'
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maven stuff
VERSION_NAME=0.9.3
VERSION_CODE=93
VERSION_NAME=0.9.4
VERSION_CODE=94
GROUP=com.mikepenz

POM_DESCRIPTION=FastAdapter Library
Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 10
targetSdkVersion 23
versionCode 93
versionName '0.9.3'
versionCode 94
versionName '0.9.4'
}
buildTypes {
release {
Expand Down
18 changes: 14 additions & 4 deletions library/src/main/java/com/mikepenz/fastadapter/FastAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,16 @@ public void expand(int position) {
//-------------------------
//-------------------------

/**
* wraps notifyDataSetChanged
*/
public void notifyAdapterDataSetChanged() {
mSelections.clear();
mExpanded.clear();
cacheSizes();
notifyDataSetChanged();
}

/**
* wraps notifyItemInserted
*
Expand All @@ -880,8 +890,8 @@ public void notifyAdapterItemInserted(int position) {
//we have to update all current stored selection and expandable states in our map
mSelections = AdapterUtil.adjustPosition(mSelections, position, Integer.MAX_VALUE, 1);
mExpanded = AdapterUtil.adjustPosition(mExpanded, position, Integer.MAX_VALUE, 1);
notifyItemInserted(position);
cacheSizes();
notifyItemInserted(position);
}

/**
Expand All @@ -894,8 +904,8 @@ public void notifyAdapterItemRangeInserted(int position, int itemCount) {
//we have to update all current stored selection and expandable states in our map
mSelections = AdapterUtil.adjustPosition(mSelections, position, Integer.MAX_VALUE, itemCount);
mExpanded = AdapterUtil.adjustPosition(mExpanded, position, Integer.MAX_VALUE, itemCount);
notifyItemRangeInserted(position, itemCount);
cacheSizes();
notifyItemRangeInserted(position, itemCount);
}

/**
Expand All @@ -907,8 +917,8 @@ public void notifyAdapterItemRemoved(int position) {
//we have to update all current stored selection and expandable states in our map
mSelections = AdapterUtil.adjustPosition(mSelections, position, Integer.MAX_VALUE, -1);
mExpanded = AdapterUtil.adjustPosition(mExpanded, position, Integer.MAX_VALUE, -1);
notifyItemRemoved(position);
cacheSizes();
notifyItemRemoved(position);
}

/**
Expand All @@ -921,8 +931,8 @@ public void notifyAdapterItemRangeRemoved(int position, int itemCount) {
//we have to update all current stored selection and expandable states in our map
mSelections = AdapterUtil.adjustPosition(mSelections, position, Integer.MAX_VALUE, itemCount * (-1));
mExpanded = AdapterUtil.adjustPosition(mExpanded, position, Integer.MAX_VALUE, itemCount * (-1));
notifyItemRangeRemoved(position, itemCount);
cacheSizes();
notifyItemRangeRemoved(position, itemCount);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,19 @@ public interface IItemAdapter<Item extends IItem> extends IAdapter<Item> {
<T> T setSubItems(IExpandable<T, Item> collapsible, List<Item> subItems);

/**
* set a new list of items for this adapter
* set a new list of items and apply it to the existing list (clear -> add) for this adapter
*
* @param items
*/
void set(List<Item> items);

/**
* sets a complete new list of items onto this adapter, using the new list. Calls notifyDataSetChanged
*
* @param items
*/
void setNewList(List<Item> items);

/**
* add an array of items to the end of the existing items
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public <T> T setSubItems(IExpandable<T, Item> collapsible, List<Item> subItems)
}

/**
* set a new list of items for this adapter
* set a new list of items and apply it to the existing list (clear -> add) for this adapter
*
* @param items
*/
Expand All @@ -156,6 +156,17 @@ public void set(List<Item> items) {
add(items);
}

/**
* sets a complete new list of items onto this adapter, using the new list. Calls notifyDataSetChanged
*
* @param items
*/
public void setNewList(List<Item> items) {
mItems = items;
mapPossibleTypes(items);
getFastAdapter().notifyAdapterDataSetChanged();
}

/**
* add an array of items to the end of the existing items
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<b>FastAdapter</b>, the bullet proof, fast and easy to use adapter library, which minimizes developing time to a fraction...
]]>
</string>
<string name="library_fastadapter_libraryVersion">0.9.3</string>
<string name="library_fastadapter_libraryVersion">0.9.4</string>
<string name="library_fastadapter_libraryWebsite">https://github.com/mikepenz/FastAdapter</string>
<string name="library_fastadapter_licenseId">apache_2_0</string>
<string name="library_fastadapter_isOpenSource">true</string>
Expand Down

0 comments on commit cf4a05b

Please sign in to comment.