Пример #1
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.leftdrawerlist_row, parent, false);
            RightDRawerViewHolder vh = new RightDRawerViewHolder(itemView, OnClick, mRecyclerView, startposition);

            return(vh);
        }
Пример #2
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            RightDRawerViewHolder photoViewHolder = holder as RightDRawerViewHolder;

            //int myposition = Convert.ToInt32(photoViewHolder.Caption.GetTag(position));


            position = position + startposition;
            List <questionmodel> question = answerplatee[position];

            for (int i = 0; i < question.Count; i++)
            {
                questionmodel objmodal = question[i];
                if (objmodal.Datatype == 1)
                {
                    photoViewHolder.Caption.SetBackgroundResource(objmodal.colorcode);
                    photoViewHolder.Caption.SetTextColor(new Android.Graphics.Color(ContextCompat.GetColor(ac, objmodal.textcolor)));
                }
            }


            position = position + 1;
            photoViewHolder.Caption.Text = position + "";


            //int color = Resource.Color.abc_background_cache_hint_selector_material_dark;

            //Animation animation = AnimationUtils.LoadAnimation(ac, (position > lastPosition) ? Resource.Animation.scale500 : Resource.Animation.scale500);
            //photoViewHolder.ItemView.StartAnimation(animation);
            //lastPosition = position;
        }