Пример #1
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View            itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.EventCardView, parent, false);
            EventViewHolder vh       = new EventViewHolder(itemView);

            Typeface iconFont = FontManager.getTypeface(parent.Context, FontManager.FONTAWESOME);

            vh.textIconLocation.Typeface = iconFont;
            vh.textIconUser.Typeface     = iconFont;
            vh.textIconDate.Typeface     = iconFont;

            return(vh);
        }
Пример #2
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            EventViewHolder vh = holder as EventViewHolder;

            vh.textTitle.Text    = "#" + mEvents[position].NroEvento.ToString() + " " + mEvents[position].Titulo;
            vh.textDate.Text     = mEvents[position].Fecha.ToShortDateString();
            vh.textUser.Text     = mEvents[position].Usuario.NombreApellido;
            vh.textLocation.Text = mEvents[position].Lugar;
            vh.textStatus.Text   = mEvents[position].Estado == 1?"Abierto":"Cerrado";

            Event ev = mEvents[position];

            vh.ItemView.Click += (sender, e) => OnClick(ev);
        }