示例#1
0
        // Raise a feature when the item-click takes place:
        void OnClick(FeatureViewHolder viewHolder)
        {
            int     position = viewHolder.AdapterPosition;
            Feature ev       = mFeature[position];

            if (ItemClick != null)
            {
                ItemClick(this, ev);
            }
        }
示例#2
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            FeatureViewHolder vh = holder as FeatureViewHolder;

            vh.textTitle.Text        = "#" + mFeature[position].Detail;
            vh.textDate.Text         = mFeature[position].Date.ToString(AysaConstants.FormatDate);
            vh.textUser.Text         = mFeature[position].Usuario.NombreApellido;
            vh.textLocation.Text     = mFeature[position].Sector.Nombre;
            vh.textStatus.Visibility = ViewStates.Invisible;

            Feature ev = mFeature[position];
        }
示例#3
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View itemView        = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.EventCardView, parent, false);
            FeatureViewHolder vh = new FeatureViewHolder(itemView);

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

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

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

            return(vh);
        }