How do I animate the RecyclerView
when the items appear for first time and also when the user scrolls, just like the way it works for the google plus app or the
https://github.com/wasabeef/recyclerview-animators
In my code is something like this:
import jp.wasabeef.recyclerview.animators.adapters.AlphaInAnimationAdapter;
....
public function populate() {
// Get your recicleview
rv = (RecyclerView)findViewById(R.id.rv);
rv.setHasFixedSize(true);
// Populate your cursor with your own method...
Cursor myRecycleItems= null;
myRecycleItems= mDbHelper.getItems();
//create your
itemsAdapter= new ItemsAdapter(myRecycleItems, getApplicationContext());
//Finnaly apply your adapter to RV with AlphaInAnimationAdapter:
rv.setAdapter(new AlphaInAnimationAdapter(itemsAdapter));
}
You need to add dependencies to your gradle
dependencies {
// jCenter
......
your curent dependencies
....
compile 'jp.wasabeef:recyclerview-animators:2.0.0'
}
Read teh doc form https://github.com/wasabeef/recyclerview-animators to install it.