private async Task GetPlaylist(string offset = "0")
        {
            if (MainScrollEvent.IsLoading)
            {
                return;
            }

            if (ListUtils.PlaylistList.Count > 0)
            {
                PlaylistAdapter.PlaylistList = new ObservableCollection <PlaylistDataObject>(ListUtils.PlaylistList);
                Activity.RunOnUiThread(() => { PlaylistAdapter.NotifyDataSetChanged(); });
                offset = PlaylistAdapter.PlaylistList.LastOrDefault()?.Id.ToString() ?? "0";
            }

            if (Methods.CheckConnectivity())
            {
                MainScrollEvent.IsLoading = true;

                int countList = PlaylistAdapter.PlaylistList.Count;
                (int apiStatus, var respond) = await RequestsAsync.Playlist.GetPlaylistAsync(UserDetails.UserId.ToString(), "15", offset);

                if (apiStatus.Equals(200))
                {
                    if (respond is PlaylistObject result)
                    {
                        var respondList = result.Playlist.Count;
                        if (respondList > 0)
                        {
                            foreach (var item in from item in result.Playlist let check = PlaylistAdapter.PlaylistList.FirstOrDefault(a => a.Id == item.Id) where check == null select item)
                            {
                                PlaylistAdapter.PlaylistList.Add(item);
                                ListUtils.PlaylistList.Add(item);
                            }

                            if (countList > 0)
                            {
                                Activity.RunOnUiThread(() => { PlaylistAdapter.NotifyItemRangeInserted(countList - 1, PlaylistAdapter.PlaylistList.Count - countList); });
                            }
                            else
                            {
                                Activity.RunOnUiThread(() => { PlaylistAdapter.NotifyDataSetChanged(); });
                            }
                        }
                        else
                        {
                            if (PlaylistAdapter.PlaylistList.Count > 10 && !MRecycler.CanScrollVertically(1))
                            {
                                Toast.MakeText(Context, Context.GetText(Resource.String.Lbl_NoMorePlaylist), ToastLength.Short).Show();
                            }
                        }
                    }
                }
                else
                {
                    MainScrollEvent.IsLoading = false;
                    Methods.DisplayReportResult(Activity, respond);
                }

                Activity.RunOnUiThread(ShowEmptyPage);
            }
            else
            {
                Inflated = EmptyStateLayout.Inflate();
                EmptyStateInflater x = new EmptyStateInflater();
                x.InflateLayout(Inflated, EmptyStateInflater.Type.NoConnection);
                if (!x.EmptyStateButton.HasOnClickListeners)
                {
                    x.EmptyStateButton.Click += null;
                    x.EmptyStateButton.Click += EmptyStateButtonOnClick;
                }

                Toast.MakeText(Context, GetString(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short).Show();
                MainScrollEvent.IsLoading = false;
            }
            MainScrollEvent.IsLoading = false;
        }
        private async Task GetPlaylist(string offsetPlaylist = "0")
        {
            if (PlaylistScrollEvent != null && PlaylistScrollEvent.IsLoading)
            {
                return;
            }

            if (PlaylistScrollEvent != null)
            {
                PlaylistScrollEvent.IsLoading = true;
            }

            if (!UserDetails.IsLogin)
            {
                return;
            }

            int countList = PlaylistAdapter.PlaylistList.Count;

            (int apiStatus, var respond) = await RequestsAsync.Playlist.GetPlaylistAsync(UserDetails.UserId.ToString(), "20", offsetPlaylist);

            if (apiStatus.Equals(200))
            {
                if (respond is PlaylistObject result)
                {
                    var respondList = result.Playlist.Count;
                    if (respondList > 0)
                    {
                        foreach (var item in from item in result.Playlist let check = PlaylistAdapter.PlaylistList.FirstOrDefault(a => a.Id == item.Id) where check == null select item)
                        {
                            PlaylistAdapter.PlaylistList.Add(item);
                        }

                        if (countList > 0)
                        {
                            PlaylistAdapter.NotifyItemRangeInserted(countList - 1, PlaylistAdapter.PlaylistList.Count - countList);
                        }
                        else
                        {
                            if (PlaylistInflated == null)
                            {
                                PlaylistInflated = PlaylistViewStub.Inflate();
                            }

                            RecyclerInflaterPlaylist = new TemplateRecyclerInflater();
                            RecyclerInflaterPlaylist.InflateLayout <PlaylistDataObject>(Activity, PlaylistInflated, PlaylistAdapter, TemplateRecyclerInflater.TypeLayoutManager.LinearLayoutManagerHorizontal, 0, true, Activity.GetString(Resource.String.Lbl_MyPlaylist));
                            if (!RecyclerInflaterPlaylist.MainLinear.HasOnClickListeners)
                            {
                                RecyclerInflaterPlaylist.MainLinear.Click += null;
                                RecyclerInflaterPlaylist.MainLinear.Click += PlaylistMoreOnClick;
                            }

                            if (PlaylistScrollEvent == null)
                            {
                                RecyclerViewOnScrollListener playlistRecyclerViewOnScrollListener = new RecyclerViewOnScrollListener(RecyclerInflaterPlaylist.LayoutManager);
                                PlaylistScrollEvent = playlistRecyclerViewOnScrollListener;
                                PlaylistScrollEvent.LoadMoreEvent += PlaylistScrollEventOnLoadMoreEvent;
                                RecyclerInflaterPlaylist.Recyler.AddOnScrollListener(playlistRecyclerViewOnScrollListener);
                                PlaylistScrollEvent.IsLoading = false;
                            }
                        }
                    }
                    else
                    {
                        if (RecyclerInflaterPlaylist.Recyler != null)
                        {
                            if (PlaylistAdapter.PlaylistList.Count > 10 && !RecyclerInflaterPlaylist.Recyler.CanScrollVertically(1))
                            {
                                Toast.MakeText(Context, Context.GetText(Resource.String.Lbl_NoMorePlaylist), ToastLength.Short).Show();
                            }
                        }
                    }
                }
            }
            else
            {
                Methods.DisplayReportResult(Activity, respond);
            }

            Activity.RunOnUiThread(ShowEmptyPage);
        }