Beispiel #1
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View itemView = LayoutInflater.From(parent.Context).
                            Inflate(Resource.Layout.ParkingPlace_Selection, parent, false);
            RecyclerHolder vh = new RecyclerHolder(itemView);

            return(vh);
        }
Beispiel #2
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
        {
            RecyclerHolder vh = viewHolder as RecyclerHolder;

            vh.Caption.Text = listData[position];

            vh.SetItemClickListener(this);
            // viewHolder.ItemView.SetBackgroundColor(Color.Green);
            //int select = 3;
            //if (select == position)
            //{
            //   // itemView.SetBackgroundColor(Color.Green);

            //}


            // var item = items[position];
            // var holder = viewHolder as RecyclerHolder;
            // holder.Caption.Text = items[position];
        }