1public void onBindViewHolder(final ViewHolder holder, final int position) {
2 holder.tv1.setText(android_versionnames[position]);
3
4 holder.row_linearlayout.setOnClickListener(new View.OnClickListener() {
5 @Override
6 public void onClick(View view) {
7 row_index=position;
8 notifyDataSetChanged();
9 }
10 });
11 if(row_index==position){
12 holder.row_linearlayout.setBackgroundColor(Color.parseColor("#567845"));
13 holder.tv1.setTextColor(Color.parseColor("#ffffff"));
14 }
15 else
16 {
17 holder.row_linearlayout.setBackgroundColor(Color.parseColor("#ffffff"));
18 holder.tv1.setTextColor(Color.parseColor("#000000"));
19 }
20
21 }
22