Exemplo n.º 1
0
        protected override GeneralViewHolder populateHolder(GeneralViewHolder _holder)
        {
            Item item = (Item)items[itemPosition];
            SearchItemViewHolder holder = (SearchItemViewHolder)_holder;

            if (item != null)
            {
                holder.ApplyData(item, activity);
            }

            return(holder);
        }
Exemplo n.º 2
0
        protected override GeneralViewHolder setupView()
        {
            SearchItemViewHolder holder = new SearchItemViewHolder();

            holder.Thumbnail     = convertView.FindViewById <ImageView>(Resource.Id.SearchItemThumbnail);
            holder.Name          = convertView.FindViewById <MainTextView>(Resource.Id.SearchItemName);
            holder.Producer      = convertView.FindViewById <MainTextView>(Resource.Id.SearchItemProducer);
            holder.Kcal          = convertView.FindViewById <MainTextView>(Resource.Id.SearchItemKcals);
            holder.Proteins      = convertView.FindViewById <MainTextView>(Resource.Id.SearchItemProteins);
            holder.Carbohydrates = convertView.FindViewById <MainTextView>(Resource.Id.SearchItemCHs);
            holder.Sugar         = convertView.FindViewById <MainTextView>(Resource.Id.SearchItemSugar);
            holder.Fat           = convertView.FindViewById <MainTextView>(Resource.Id.SearchItemFat);
            return(holder);
        }