@Override
        public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
            final MyViewHolder myHolder = (MyViewHolder) holder;
            int color = mColors.get(position);
            myHolder.container.setBackgroundColor(color);
            myHolder.textView.setText("#" + Integer.toHexString(color));
        }
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