Example #1
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            OptikListRecyclerViewHolder viewholder = holder as OptikListRecyclerViewHolder;

            TumSecimleriTemizle(viewholder);
            var item = mData[position];

            viewholder.SoruNumasiText.Text = (position + 1).ToString();
            switch (item.Cevap)
            {
            case "A":
                viewholder.CA.SetBackgroundResource(Resource.Drawable.optikcember_select);
                break;

            case "B":
                viewholder.CB.SetBackgroundResource(Resource.Drawable.optikcember_select);
                break;

            case "C":
                viewholder.CC.SetBackgroundResource(Resource.Drawable.optikcember_select);
                break;

            case "D":
                viewholder.CD.SetBackgroundResource(Resource.Drawable.optikcember_select);
                break;

            case "E":
                viewholder.CE.SetBackgroundResource(Resource.Drawable.optikcember_select);
                break;

            default:
                break;
            }
        }
Example #2
0
 void TumSecimleriTemizle(OptikListRecyclerViewHolder hodlerrr)
 {
     hodlerrr.CA.SetBackgroundResource(Resource.Drawable.optikcember_noselect);
     hodlerrr.CB.SetBackgroundResource(Resource.Drawable.optikcember_noselect);
     hodlerrr.CC.SetBackgroundResource(Resource.Drawable.optikcember_noselect);
     hodlerrr.CD.SetBackgroundResource(Resource.Drawable.optikcember_noselect);
     hodlerrr.CE.SetBackgroundResource(Resource.Drawable.optikcember_noselect);
 }