Beispiel #1
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            // Inflate the CardView for the photo:
            View itemView = LayoutInflater.From(parent.Context).
                            Inflate(Resource.Layout.card, parent, false);

            // Create a ViewHolder to hold view references inside the CardView:
            CardViewHolder vh = new CardViewHolder(itemView, (e) => ItemClick?.Invoke(this, e));

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

            vh.Teacher.Text = lectures.Lectures[position].kc[0].XM;

            vh.Caption.Text = lectures.Lectures[position].kc[0].KCMC;

            vh.Pos.Text = lectures.Lectures[position].kc[0].JSMC;
            vh.SetBackGround();
        }