public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { FestivityViewHolder vh = holder as FestivityViewHolder; // Set the TextViews in this ViewHolder's ListItem // from this position in the data: vh.festivityDate.Text = DateTime.Now.ToLongDateString(); vh.festivityMaxBAC.Text = "Maximum BAC: 0.25%"; vh.festivityBAC.Text = "Achieved BAC: 0.1%"; vh.festivityDate.SetOnTouchListener(new TouchListenerHelper(vh, startDragListener)); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { // Inflate the RecyclerItem View View itemView = LayoutInflater.From(parent.Context). Inflate(Resource.Layout.festivity_list_item, parent, false); // Create a ViewHolder to find and hold these view references, and // register OnClick with the view holder: FestivityViewHolder vh = new FestivityViewHolder(itemView, OnClick); return(vh); }