예제 #1
0
        OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.RecycleViewNews, parent, false);

            NewsHolder vh = new NewsHolder(itemView, OnClick);

            return(vh);
        }
예제 #2
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            NewsHolder vh = holder as NewsHolder;

            //vh.Image.SetImageResource(DataNews[position].PhotoID);
            vh.Title.Text = mDataNews[position].Title;
            vh.Text.Text  = mDataNews[position].Text;
            vh.Date.Text  = mDataNews[position].Date.ToShortDateString();
            vh.Autor.Text = mDataNews[position].Autor;
        }