This library is provided simple animator on the Recyclerview.
repositories {
maven { url 'http://daneko.github.io/m2repo/repository' }
}
dependencies {
compile 'com.github.daneko:simple-item-animator:0.0.1-SNAPSHOT'
}
// set animation only!
recyclerView.setItemAnimator(
SimpleItemAnimator.builder().
preAddAnimationState(v -> {
ViewCompat.setAlpha(v, 1);
ViewCompat.setScaleX(v, 0);
ViewCompat.setScaleY(v, 0);
return Unit.unit();
}).
addAnimation(animator -> animator.scaleX(1).scaleY(1)).
addDuration(500).
removeAnimation(animator ->
animator.translationXBy(recyclerView.getWidth())).
preChangeAnimationState((oldV, newVOpt, param) -> {
ViewCompat.setAlpha(oldV, 1);
newVOpt.foreach(newV -> {
ViewCompat.setAlpha(newV, 0);
ViewCompat.setRotationX(newV, -180);
return Unit.unit();
});
return Unit.unit();
}).
changeAnimation(
(forOld, param) -> forOld.rotationX(180).alpha(0),
(forNew, param) -> forNew.rotationX(0).alpha(1)).
isChangeAnimationMix(false).
changeDuration(500).
build());
- Lombok (license MIT)
- RxAndroid (license apache license 2.0)
- retrolambda (license apache license 2.0)
- FunctionalJava (license BSD 3)
- JSR305 (license BSD 3)
- slf4j (license MIT)
and com.android.support:recyclerview-v7:21.0.3
- ButterKnife (license apache license 2.0)
- logback android (license EPL)
sdk.dir=/usr/local/opt/android-sdk
java8_home=/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home
java7_home=/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home
(The MIT License)
Copyright (c) 2014 daneko