Skip to content

Commit

Permalink
Merge branch 'release/v0.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Jan 11, 2016
2 parents 05baac9 + 9b9d7b8 commit c2b242c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Beside being blazing fast, minimizing the code you need to write, it is also rea
#Include in your project
##Using Maven
```javascript
compile('com.mikepenz:fastadapter:0.7.0@aar') {
compile('com.mikepenz:fastadapter:0.7.1@aar') {
transitive = true
}
```
Expand Down
4 changes: 2 additions & 2 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 70
versionName '0.7.0'
versionCode 71
versionName '0.7.1'

applicationVariants.all { variant ->
variant.outputs.each { output ->
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ org.gradle.daemon=true
org.gradle.parallel=true

# Maven stuff
VERSION_NAME=0.7.0
VERSION_CODE=70
VERSION_NAME=0.7.1
VERSION_CODE=71
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 70
versionName '0.7.0'
versionCode 71
versionName '0.7.1'
}
buildTypes {
release {
Expand Down
22 changes: 10 additions & 12 deletions library/src/main/java/com/mikepenz/fastadapter/FastAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ public FastAdapter<Item> withOnTouchListener(OnTouchListener<Item> mOnTouchListe

/**
* select between the different selection behaviors.
* there are now 2 different variants of selection. you can toggle this via `withSelectWithItemUpdate(boolean)` (where false == default --> variant 1)
* there are now 2 different variants of selection. you can toggle this via `withSelectWithItemUpdate(boolean)` (where false == default - variant 1)
* 1.) direct selection via the view "selected" state, we also make sure we do not animate here so no notifyItemChanged is called if we repeatly press the same item
* 2.) we select the items via a notifyItemChanged. -> this will allow custom selected logics within your views (isSelected() --> do something...) and it will also animate the change via the provided itemAnimator. because of the animation of the itemAnimator the selection will have a small delay (time of animating)
* 2.) we select the items via a notifyItemChanged. this will allow custom selected logics within your views (isSelected() - do something...) and it will also animate the change via the provided itemAnimator. because of the animation of the itemAnimator the selection will have a small delay (time of animating)
*
* @param selectWithItemUpdate true if notifyItemChanged should be called upon select
* @return this
Expand Down Expand Up @@ -869,20 +869,18 @@ public void notifyAdapterItemRangeRemoved(int position, int itemCount) {
* @param toPosition the global toPosition
*/
public void notifyAdapterItemMoved(int fromPosition, int toPosition) {
if (mSelections.contains(fromPosition)) {
//collapse items we move. just in case :D
collapse(fromPosition);
collapse(toPosition);

if (!mSelections.contains(fromPosition) && mSelections.contains(toPosition)) {
mSelections.remove(toPosition);
mSelections.add(fromPosition);
} else if (mSelections.contains(fromPosition) && !mSelections.contains(toPosition)) {
mSelections.remove(fromPosition);
mSelections.add(toPosition);
}

//we have to update all current stored selection and expandable states in our map
if (fromPosition < toPosition) {
mSelections = AdapterUtil.adjustPosition(mSelections, fromPosition, toPosition, -1);
mExpanded = AdapterUtil.adjustPosition(mExpanded, fromPosition, toPosition, -1);
} else {
mSelections = AdapterUtil.adjustPosition(mSelections, toPosition, fromPosition, 1);
mExpanded = AdapterUtil.adjustPosition(mExpanded, toPosition, fromPosition, 1);
}

notifyItemMoved(fromPosition, toPosition);
}

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.7.0</string>
<string name="library_fastadapter_libraryVersion">0.7.1</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 c2b242c

Please sign in to comment.