1@Override
2public void onBindViewHolder(ViewHolder holder, int position)
3{
4 if(position % 2 == 0)
5 {
6 //holder.rootView.setBackgroundColor(Color.BLACK);
7 holder.rootView.setBackgroundResource(R.color.black);
8 }
9 else
10 {
11 //holder.rootView.setBackgroundColor(Color.WHITE);
12 holder.rootView.setBackgroundResource(R.color.white);
13 }
14}