public override void OnBindViewHolder(RecyclerView.ViewHolder vh, int position)
        {
            try
            {
                int type = GetItemViewType(position);
                var item = MessageList[type];
                if (item == null)
                {
                    return;
                }
                switch (item.MessageType)
                {
                case "text":
                {
                    TextViewHolder holder = vh as TextViewHolder;
                    LoadTextOfChatItem(holder, position, item);
                    break;
                }

                case "media":
                {
                    ImageViewHolder holder = vh as ImageViewHolder;
                    LoadImageOfChatItem(holder, position, item);
                    break;
                }

                case "sticker" when item.Sticker.Contains(".gif"):
                {
                    GifViewHolder holder = vh as GifViewHolder;
                    LoadGifOfChatItem(holder, position, item);
                    break;
                }

                case "sticker":
                {
                    StickerViewHolder holder = vh as StickerViewHolder;
                    LoadStickerOfChatItem(holder, position, item);
                    break;
                }
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            try
            {
                //Setup your layout here >>
                var itemView = MessageList[viewType];
                if (itemView != null)
                {
                    if (itemView.From == UserDetails.UserId && itemView.MessageType == "text")
                    {
                        View           row            = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Right_MS_view, parent, false);
                        TextViewHolder textViewHolder = new TextViewHolder(row, ActivityContext);
                        return(textViewHolder);
                    }

                    if (itemView.To == UserDetails.UserId && itemView.MessageType == "text")
                    {
                        View           row            = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Left_MS_view, parent, false);
                        TextViewHolder textViewHolder = new TextViewHolder(row, ActivityContext);
                        return(textViewHolder);
                    }
                    if (itemView.From == UserDetails.UserId && itemView.MessageType == "media")
                    {
                        View            row             = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Right_MS_image, parent, false);
                        ImageViewHolder imageViewHolder = new ImageViewHolder(row);
                        return(imageViewHolder);
                    }
                    if (itemView.To == UserDetails.UserId && itemView.MessageType == "media")
                    {
                        View            row             = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Left_MS_image, parent, false);
                        ImageViewHolder imageViewHolder = new ImageViewHolder(row);
                        return(imageViewHolder);
                    }
                    if (itemView.From == UserDetails.UserId && itemView.MessageType == "sticker")
                    {
                        if (itemView.Sticker.Contains(".gif"))
                        {
                            View          row        = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Right_MS_gif, parent, false);
                            GifViewHolder viewHolder = new GifViewHolder(row);
                            return(viewHolder);
                        }
                        else
                        {
                            View row = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Right_MS_sticker, parent, false);
                            StickerViewHolder stickerViewHolder = new StickerViewHolder(row);
                            return(stickerViewHolder);
                        }
                    }
                    if (itemView.To == UserDetails.UserId && itemView.MessageType == "sticker")
                    {
                        if (itemView.Sticker.Contains(".gif"))
                        {
                            View          row        = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Left_MS_gif, parent, false);
                            GifViewHolder viewHolder = new GifViewHolder(row);
                            return(viewHolder);
                        }
                        else
                        {
                            View row = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Left_MS_sticker, parent, false);
                            StickerViewHolder stickerViewHolder = new StickerViewHolder(row);
                            return(stickerViewHolder);
                        }
                    }

                    return(null);
                }

                return(null);
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
                return(null);
            }
        }
        private void LoadStickerOfChatItem(StickerViewHolder holder, int position, GetChatConversationsObject.Messages message)
        {
            try
            {
                string imageUrl = message.Sticker;
                string fileSavedPath;

                try
                {
                    DateTime time = Methods.Time.UnixTimeStampToDateTime(int.Parse(message.CreatedAt));
                    holder.Time.Text = time.ToShortTimeString();
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }

                if (imageUrl.Contains("http://") || imageUrl.Contains("https://"))
                {
                    var    fileName  = imageUrl.Split('_').Last();
                    string imageFile = Methods.MultiMedia.GetMediaFrom_Disk(Methods.Path.FolderDiskSticker, fileName);
                    if (imageFile == "File Dont Exists")
                    {
                        holder.LoadingProgressView.Indeterminate = false;
                        holder.LoadingProgressView.Visibility    = ViewStates.Visible;

                        var url = imageUrl.Contains("media3.giphy.com/");
                        if (url)
                        {
                            imageUrl = imageUrl.Replace(Client.WebsiteUrl, "");
                        }

                        Methods.MultiMedia.DownloadMediaTo_DiskAsync(Methods.Path.FolderDiskSticker, imageUrl);

                        Glide.With(ActivityContext).Load(imageUrl).Apply(new RequestOptions().Placeholder(Resource.Drawable.ImagePlacholder)).Into(holder.ImageView);

                        //GlideImageLoader.LoadImage(ActivityContext,imageUrl, holder.ImageView, ImageStyle.CenterCrop, ImagePlaceholders.Drawable);

                        holder.LoadingProgressView.Indeterminate = false;
                        holder.LoadingProgressView.Visibility    = ViewStates.Gone;
                    }
                    else
                    {
                        fileSavedPath = imageFile;

                        Glide.With(ActivityContext).Load(fileSavedPath).Apply(new RequestOptions().Placeholder(Resource.Drawable.ImagePlacholder)).Into(holder.ImageView);

                        //GlideImageLoader.LoadImage(ActivityContext,fileSavedPath, holder.ImageView, ImageStyle.CenterCrop, ImagePlaceholders.Drawable);

                        holder.LoadingProgressView.Indeterminate = false;
                        holder.LoadingProgressView.Visibility    = ViewStates.Gone;
                    }
                }
                else
                {
                    fileSavedPath = imageUrl;

                    Glide.With(ActivityContext).Load(fileSavedPath).Apply(new RequestOptions().Placeholder(Resource.Drawable.ImagePlacholder)).Into(holder.ImageView);

                    //GlideImageLoader.LoadImage(ActivityContext,fileSavedPath, holder.ImageView, ImageStyle.CenterCrop, ImagePlaceholders.Drawable);

                    holder.LoadingProgressView.Indeterminate = false;
                    holder.LoadingProgressView.Visibility    = ViewStates.Gone;
                }


                holder.LytParent.Activated = SelectedItems.Get(position, false);
                if (!holder.LytParent.HasOnClickListeners)
                {
                    holder.LytParent.Click += delegate
                    {
                        try
                        {
                            if (ClickListener == null)
                            {
                                return;
                            }

                            ClickListener.ItemClick(holder.LytParent, message, position);
                        }
                        catch (Exception e)
                        {
                            Console.WriteLine(e);
                        }
                    };

                    holder.LytParent.LongClick += delegate
                    {
                        try
                        {
                            if (ClickListener == null)
                            {
                                return;
                            }

                            ClickListener.ItemLongClick(holder.LytParent, message, position);
                        }
                        catch (Exception e)
                        {
                            Console.WriteLine(e);
                        }
                    };
                }
                ToggleCheckedBackground(holder, position);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }