private void CategoriesAdapterOnItemClick(object sender, CategoriesAdapterClickEventArgs e)
        {
            try
            {
                KeySearch = "";

                MarketTab.MAdapter.MarketList.Clear();
                MarketTab.MAdapter.NotifyDataSetChanged();

                var item = CategoriesAdapter.GetItem(e.Position);
                if (item != null)
                {
                    var check = CategoriesAdapter.MCategoriesList.Where(a => a.CategoriesColor == AppSettings.MainColor).ToList();
                    if (check.Count > 0)
                    {
                        foreach (var all in check)
                        {
                            all.CategoriesColor = "#ffffff";
                        }
                    }

                    var click = CategoriesAdapter.MCategoriesList.FirstOrDefault(a => a.CategoriesId == item.CategoriesId);
                    if (click != null)
                    {
                        click.CategoriesColor = AppSettings.MainColor;
                    }

                    CategoriesAdapter.NotifyDataSetChanged();

                    MarketTab.SwipeRefreshLayout.Refreshing = true;
                    MarketTab.SwipeRefreshLayout.Enabled    = true;

                    if (Methods.CheckConnectivity())
                    {
                        PollyController.RunRetryPolicyFunction(new List <Func <Task> > {
                            () => GetMarketByKey(KeySearch, item.CategoriesId)
                        });
                    }
                    else
                    {
                        Toast.MakeText(this, GetText(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Long)?.Show();
                    }
                }
            }
            catch (Exception exception)
            {
                Methods.DisplayReportResultTrack(exception);
            }
        }
 private void CategoriesAdapter_OnItemClick(object sender, Categories_AdapterClickEventArgs adapterClickEvents)
 {
     try
     {
         var position = adapterClickEvents.Position;
         if (position >= 0)
         {
             var item = CategoriesAdapter.GetItem(position);
             if (item != null)
             {
                 CategoriesAdapter.Click_Categories(item);
                 CategoryId = item.Catigories_Id;
             }
         }
     }
     catch (Exception e)
     {
         Crashes.TrackError(e);
     }
 }