public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { //Setup your layout here View itemView = null; itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.SearchRow, parent, false); var vh = new SearchAdapterViewHolder(itemView, OnClick); return(vh); }
// Replace the contents of a view (invoked by the layout manager) public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) { var product = productlist[position]; //var url = imageurls[position]; // Replace the contents of the view with that element holder = viewHolder as SearchAdapterViewHolder; GetProductImage(imagepaths[position]); //ImageService.Instance.LoadUrl(imageurls[position]) // .Retry(3, 200) // .DownSample(100, 100) // .Into(holder.productimage); ImageService.Instance.LoadUrl(imageurls[position]) .Retry(3, 200) .DownSample(100, 100) .Into(holder.productimage); holder.productname.Text = product.productname; holder.unitprice.Text = 250.ToString(); // holder.productimage.Text = product.amount.ToString(); //holder.proidtext.Text = product.ID; //StorageReference ppref = FirebaseStorage.Instance.GetReference($"products/{product.category}/{product.productname}_image"); //ppref.GetDownloadUrl().AddOnSuccessListener(Application.Context, this); //holder.ppicurl.Text = user.ProfileImage != null ? user.ProfileImage.ToString() : "No URL"; }