Exemplo n.º 1
0
        //-----------------------------------------------------------------------------------------------------------------
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            LayoutInflater inflater = LayoutInflater.From(parent.Context);
            View           itemView = inflater.Inflate(Resource.Layout.single_task_item, parent, false);

            TaskHolder taskHolder = new TaskHolder(itemView);

            return(taskHolder);
        }
Exemplo n.º 2
0
        //-----------------------------------------------------------------------------------------------------------------
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            TaskHolder taskHolder = holder as TaskHolder;

            Task task = listOfTasks[position];

            var strTask = task.shortDescription + "    " + task.percentage + "%";

            taskHolder.textView.Text = strTask;
        }