private void addItem(View view) {
            int position = mRecyclerView.getChildAdapterPosition(view);
            if (position != RecyclerView.NO_POSITION) {
                int color = generateColor();
                mColors.add(position, color);
                notifyItemInserted(position);
            }
        }
Custom adapter that supplies view holders to the RecyclerView. Our view holders
contain a simple LinearLayout (with a background color) and a TextView (displaying
the value of the container's bg color).
RecyclerViewAnimations/app/src/main/java/examples/android/com/recyclerviewanimations/MainActivity.java