// Replace the contents of a view (invoked by the layout manager) public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) { try { if (viewHolder is RowSoundLiteAdapterViewHolder holder) { var item = SoundsList[position]; if (item != null) { GlideImageLoader.LoadImage(ActivityContext, item.Thumbnail, holder.Image, ImageStyle.CenterCrop, ImagePlaceholders.Drawable); holder.TxtTitle.Text = Methods.FunString.SubStringCutOf(Methods.FunString.DecodeString(item.Title), 25); holder.TxtSeconderText.Text = item.CategoryName + " " + ActivityContext.GetText(Resource.String.Lbl_Music) + " - " + Methods.FunString.FormatPriceValue(Convert.ToInt32(item.CountViews.Replace("K", "").Replace("M", ""))); holder.IconHeart.Tag = item.IsLiked ? "Like" : "Liked"; SetLike(holder.IconHeart); if (!holder.IconHeart.HasOnClickListeners) { holder.IconHeart.Click += (sender, e) => ClickListeners.OnLikeSongsClick(new LikeSongsClickEventArgs { View = holder.MainView, SongsClass = item, LikeButton = holder.IconHeart }, NamePage); } if (!holder.MoreButton.HasOnClickListeners) { holder.MoreButton.Click += (sender, e) => ClickListeners.OnMoreClick(new MoreSongClickEventArgs { View = holder.MainView, SongsClass = item }, NamePage); } } } } catch (Exception e) { Console.WriteLine(e); } }