public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { // instantiates the item layout file and the view holder View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.TendenciaCardView, parent, false); TendenciaViewHolder vh = new TendenciaViewHolder(itemView, OnClick); return(vh); }
public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { // loads the data at the specified position into the views whose // references are stored in the given view holder Tendencia tend = Tendencias[position]; TendenciaViewHolder vh = holder as TendenciaViewHolder; vh.Request.Text = tend.Pedido; vh.Occurrences.Text = tend.Repeticoes.ToString(); }