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

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

            vh.projectName.Text = mProject[position].mProjectName;
            vh.startDate.Text   = mProject[position].mStartDate;
            vh.endDate.Text     = mProject[position].mEndDate;
            vh.percent.Text     = mProject[position].mPercent;
            vh.work.Text        = mProject[position].mWork;
            vh.duration.Text    = mProject[position].mDuration;
            vh.resource.Click  += delegate { main.bringDialogs(1); };
            vh.edit.Click      += delegate { main.bringDialogs(2); };
            vh.delete.Click    += delegate { main.bringDialogs(3); };
        }