public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { if (holder is MyViewHolder) { MyViewHolder myViewHolder = holder as MyViewHolder; myViewHolder.RoomNum.Text = data[position].RoomNum; myViewHolder.CourseName.Text = data[position].CourseName; myViewHolder.TeacherName.Text = data[position].TeacherName; myViewHolder.CourseTime.Text = data[position].CourseTime; myViewHolder.CourseNum.Text = data[position].CourseNum; myViewHolder.ItemView.SetOnClickListener(this); } }
public override void OnViewRecycled(Java.Lang.Object holder) { base.OnViewRecycled(holder); MyViewHolder myViewHolder = holder as MyViewHolder; }