Exemple #1
0
        private async Task PromotionLoad()
        {
            progressBar.Visibility = ViewStates.Visible;
            await Task.Run(() =>
            {
                try
                {
                    FireBaseConnector connector = new FireBaseConnector();
                    promotions = connector.GetPromotions();
                    if (promotions != null)
                    {
                        ShopGridViewAdapter adapter = new ShopGridViewAdapter(this.Activity.BaseContext, promotions);
                        gridView = view.FindViewById <GridView>(Resource.Id.grid_view_image_text);
                        this.Activity.RunOnUiThread(() => { gridView.Adapter = adapter; });
                        gridView.ItemClick += GridView_ItemClick;
                    }
                }
                catch
                {
                }
            });

            progressBar.Visibility = ViewStates.Invisible;
        }
Exemple #2
0
        public async void OnOfferChange(object o, EventArgs e)
        {
            FireBaseConnector connector = new FireBaseConnector();

            promotions = connector.GetPromotions();
        }