Skip to content

Commit

Permalink
Merge branch 'release/v1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Jul 2, 2017
2 parents ae29c96 + 8c4b04e commit 50c858f
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 48 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ These `Animators` correctly work with all view states and `RecyclerView` states
#Include in your project
##Using Maven
```javascript
compile "com.mikepenz:itemanimators:0.5.0@aar"
compile "com.mikepenz:itemanimators:1.0.0@aar"
compile "com.android.support:recyclerview-v7:${supportLibVersion}"
```

Expand Down
15 changes: 8 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ android {

defaultConfig {
minSdkVersion 14
targetSdkVersion 24
versionCode 50
versionName '0.5.0'
targetSdkVersion 25
versionCode 1000
versionName '1.0.0'

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

//used to generate the drawer on the left
//https://github.com/mikepenz/MaterialDrawer
compile('com.mikepenz:materialdrawer:5.5.0@aar') {
compile('com.mikepenz:materialdrawer:5.9.3@aar') {
transitive = true
exclude module: "itemanimators"
exclude module: "fastadapter"
Expand All @@ -62,11 +62,12 @@ dependencies {
// used to fill the RecyclerView with the DrawerItems
// and provides single and multi selection, collapsable items
// https://github.com/mikepenz/FastAdapter
compile 'com.mikepenz:fastadapter:1.7.0@aar'
compile 'com.mikepenz:fastadapter:2.6.2@aar'
compile 'com.mikepenz:fastadapter-commons:2.6.0@aar'

//used to generate the Open Source section
//https://github.com/mikepenz/AboutLibraries
compile('com.mikepenz:aboutlibraries:5.8.0@aar') {
compile('com.mikepenz:aboutlibraries:5.9.6@aar') {
transitive = true
}
//used to display the icons in the drawer
Expand All @@ -78,5 +79,5 @@ dependencies {

//used to load the images in the ImageListSample
//https://github.com/bumptech/glide
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.bumptech.glide:glide:3.8.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.mikepenz.fastadapter.commons.utils.FastAdapterUIUtils;
import com.mikepenz.fastadapter.items.AbstractItem;
import com.mikepenz.fastadapter.utils.FastAdapterUIUtils;
import com.mikepenz.fastadapter.utils.ViewHolderFactory;
import com.mikepenz.itemanimators.app.R;
import com.mikepenz.materialize.util.UIUtils;

import java.util.List;

import butterknife.Bind;
import butterknife.ButterKnife;

Expand Down Expand Up @@ -52,8 +53,8 @@ public int getLayoutRes() {
}

@Override
public void bindView(ViewHolder viewHolder) {
super.bindView(viewHolder);
public void bindView(ViewHolder viewHolder, List<Object> payloads) {
super.bindView(viewHolder, payloads);

//get context
Context ctx = viewHolder.itemView.getContext();
Expand All @@ -72,25 +73,9 @@ public void bindView(ViewHolder viewHolder) {
Glide.with(ctx).load(mImageUrl).animate(R.anim.alpha_on).into(viewHolder.imageView);
}

/**
* our ItemFactory implementation which creates the ViewHolder for our adapter.
* It is highly recommended to implement a ViewHolderFactory as it is 0-1ms faster for ViewHolder creation,
* and it is also many many times more efficient if you define custom listeners on views within your item.
*/
public class ItemFactory implements ViewHolderFactory<ViewHolder> {
public ViewHolder create(View v) {
return new ViewHolder(v);
}
}

/**
* return our ViewHolderFactory implementation here
*
* @return
*/
@Override
public ViewHolderFactory getFactory() {
return new ItemFactory();
public ViewHolder getViewHolder(View v) {
return new ViewHolder(v);
}

/**
Expand Down
16 changes: 7 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
buildscript {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.novoda:bintray-release:0.3.4'
classpath 'com.android.tools.build:gradle:2.3.2'
classpath 'com.novoda:bintray-release:0.5.0'
}
}

allprojects {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}

ext {
compileSdkVersion = 24
buildToolsVersion = "24.0.1"
supportLibVersion = "24.2.0"
}

task wrapper(type: Wrapper) {
gradleVersion = '2.14'
compileSdkVersion = 25
buildToolsVersion = "25.0.3"
supportLibVersion = "25.4.0"
}
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.5.0
VERSION_CODE=50
VERSION_NAME=1.0.0
VERSION_CODE=100
GROUP=com.mikepenz
POM_DESCRIPTION=ItemAnimators Library
POM_URL=https://github.com/mikepenz/itemanimators
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Jun 18 18:36:19 CEST 2016
#Sun Jul 02 14:41:32 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
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 14
targetSdkVersion 24
versionCode 50
versionName '0.5.0'
versionCode 100
versionName '1.0.0'
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
*/
package com.mikepenz.itemanimators;

import android.support.v4.animation.AnimatorCompatHelper;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.support.v4.view.ViewCompat;
import android.support.v4.view.ViewPropertyAnimatorCompat;
import android.support.v4.view.ViewPropertyAnimatorListener;
Expand All @@ -37,6 +38,7 @@
*/
public abstract class BaseItemAnimator<T> extends SimpleItemAnimator {
private static final boolean DEBUG = false;
private static TimeInterpolator sDefaultInterpolator;

private ArrayList<ViewHolder> mPendingRemovals = new ArrayList<>();
private ArrayList<ViewHolder> mPendingAdditions = new ArrayList<>();
Expand Down Expand Up @@ -623,7 +625,11 @@ public void endAnimation(final ViewHolder item) {
}

public void resetAnimation(ViewHolder holder) {
AnimatorCompatHelper.clearInterpolator(holder.itemView);
if(sDefaultInterpolator == null) {
sDefaultInterpolator = (new ValueAnimator()).getInterpolator();
}

holder.itemView.animate().setInterpolator(sDefaultInterpolator);
endAnimation(holder);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
The <b>ItemAnimators</b> library comes with a huge collections of pre-created Animators for your RecyclerView.
]]>
</string>
<string name="library_itemanimators_libraryVersion">0.5.0</string>
<string name="library_itemanimators_libraryVersion">1.0.0</string>
<string name="library_itemanimators_libraryWebsite">https://github.com/mikepenz/itemanimators</string>
<string name="library_itemanimators_licenseId">apache_2_0</string>
<string name="library_itemanimators_isOpenSource">true</string>
Expand Down

0 comments on commit 50c858f

Please sign in to comment.