Example #1
0
        // Fill in the contents of the photo card (invoked by the layout manager):
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            KanbanViewHolder vh = holder as KanbanViewHolder;
            // Set the ImageView and TextView in this ViewHolder's CardView
            // from this position in the photo album:
            var item = DataBase.db.Table <Kanbans>().ElementAt(position);

            vh.KanbanId     = item.id;
            vh.Caption.Text = item.Title;
        }
Example #2
0
        // Create a new CardView (invoked by the layout manager):
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            // Inflate the CardView for the photo:
            View itemView = LayoutInflater.From(parent.Context).
                            Inflate(Resource.Layout.kanban_cardview, parent, false);

            // Create a ViewHolder to find and hold these view references, and
            // register OnClick with the view holder:
            KanbanViewHolder vh = new KanbanViewHolder(itemView, OnClick, OnLongClick);

            return(vh);
        }