Skip to content

Commit

Permalink
Merge branch 'release/v0.2.0-SNAPSHOT'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Jan 11, 2016
2 parents b0d9cd2 + 3b1c72d commit 38dd2e1
Show file tree
Hide file tree
Showing 24 changed files with 526 additions and 381 deletions.
Binary file added DEV/preview/Telecine_2016-01-09-19-01-46.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DEV/preview/Telecine_2016-01-09-19-01-46.mp4
Binary file not shown.
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#ItemAnimators [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.mikepenz/itemanimators/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/com.mikepenz/itemanimators) [![Join the chat at https://gitter.im/mikepenz/itemanimators](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mikepenz/itemanimators?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

The **ItemAnimators** library comes with a huge collections of pre-created Animators for your RecyclerView.
It was created so developers can easly animate their RecyclerView. It also takes care about correctly handling all view states so you don't have to.
The **ItemAnimators** library comes with a huge collections of pre-created animators for your `RecyclerView`. It was created so developers can easily animate their `RecyclerView`.
These `Animators` correctly work with all view states and `RecyclerView` states (as the `DefaultItemAnimator` does)

> **DISCLAIMER**: this library does not animate items on scroll, just when added, removed, moved, or changed
#Preview
##Screenshots
<img src="DEV/preview/Telecine_2016-01-09-19-01-46.gif" width="32%">

#Include in your project
##Using Maven
```javascript
compile('com.mikepenz:itemanimators:0.1.0-SNAPSHOT@aar') {
compile('com.mikepenz:itemanimators:0.2.0-SNAPSHOT@aar') {
transitive = true
}

Expand All @@ -33,6 +33,28 @@ mRecyclerView.setItemAnimator(new ScaleUpAnimator());
//https://github.com/mikepenz/FastAdapter
```

##Included animators

* **Simple**
* `AlphaInAnimator`

* **Resize**
* `ScaleUpAnimator`
* `ScaleXAnimator`
* `ScaleYAnimator`

* **Move**
* `SlideDownAlphaAnimator` (Best for collapse animations)
* `SlideRightAlphaAnimator`
* `SlideUpAlphaAnimator`
* `SlideLeftAlphaAnimator`
* `SlideInOutTopAnimator`
* `SlideInOutRightAnimator`
* `SlideInOutBottomAnimator`
* `SlideInOutLeftAnimator`

* more will follow soon...

#Developed By

* Mike Penz
Expand Down
13 changes: 10 additions & 3 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 10
versionName '0.1.0-SNAPSHOT'
versionCode 20
versionName '0.2.0-SNAPSHOT'

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

//used to generate the drawer on the left
//https://github.com/mikepenz/MaterialDrawer
compile('com.mikepenz:materialdrawer:5.0.0.fastAdapter.b5-SNAPSHOT@aar') {
compile('com.mikepenz:materialdrawer:5.0.0.fastAdapter.b7-SNAPSHOT@aar') {
transitive = true
exclude module: "itemanimators"
exclude module: "fastadapter"
}

// 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:0.7.1@aar'

//used to generate the Open Source section
//https://github.com/mikepenz/AboutLibraries
compile('com.mikepenz:aboutlibraries:5.3.4@aar') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
Expand Down Expand Up @@ -128,17 +129,15 @@ public boolean onItemClick(View view, int position, IDrawerItem drawerItem) {
//configure our fastAdapter
//get our recyclerView and do basic setup
mRecyclerView = (RecyclerView) findViewById(R.id.rv);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mRecyclerView.setItemAnimator(new ScaleUpAnimator());
mRecyclerView.setLayoutManager(new GridLayoutManager(this, 3));
mRecyclerView.setAdapter(mItemAdapter.wrap(mFastAdapter));

//add some dummy data
mItemAdapter.add(ImageDummyData.getImages());
mRecyclerView.setItemAnimator(new AlphaInAnimator());
mRecyclerView.getItemAnimator().setAddDuration(500);
mRecyclerView.getItemAnimator().setRemoveDuration(500);

//restore selections (this has to be done after the items were added
mFastAdapter.withSavedInstanceState(savedInstanceState);


/**
* selection spinner for the different animtors
*/
Expand All @@ -160,6 +159,14 @@ public void onItemSelected(AdapterView<?> parent, View view, int position, long
public void onNothingSelected(AdapterView<?> parent) {
}
});

new Handler().postDelayed(new Runnable() {
@Override
public void run() {
//add some dummy data
mItemAdapter.add(ImageDummyData.getImages());
}
}, 50);
}

@Override
Expand Down
134 changes: 0 additions & 134 deletions app/src/main/java/com/mikepenz/itemanimators/app/items/SampleItem.java

This file was deleted.

36 changes: 0 additions & 36 deletions app/src/main/res/layout/sample_item.xml

This file was deleted.

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.1.0-SNAPSHOT
VERSION_CODE=10
VERSION_NAME=0.2.0-SNAPSHOT
VERSION_CODE=20
GROUP=com.mikepenz

POM_DESCRIPTION=ItemAnimators 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 10
versionName '0.1.0-SNAPSHOT'
versionCode 20
versionName '0.2.0-SNAPSHOT'
}
buildTypes {
release {
Expand Down
Loading

0 comments on commit 38dd2e1

Please sign in to comment.