use of it.gmariotti.recyclerview.itemanimator.demo.adapter.AnimationGridAdapter in project RecyclerViewItemAnimators by gabrielemariotti.
the class AnimationGridActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recycler);
//Setup Spinner
setupSpinner();
//Setup RecyclerView
mRecyclerView = (RecyclerView) findViewById(R.id.list);
//mRecyclerView.setHasFixedSize(true);
mRecyclerView.setLayoutManager(new GridLayoutManager(this, 5));
mAdapter = new AnimationGridAdapter(this);
AlphaAnimatorAdapter animatorAdapter = new AlphaAnimatorAdapter(mAdapter, mRecyclerView);
animatorAdapter.getViewAnimator().setInitialDelayMillis(500);
mRecyclerView.setAdapter(animatorAdapter);
}
Aggregations