protected async override void OnAppearing() { base.OnAppearing(); categoryPicker.ItemsSource = await CitylightGroup.GetGroupsAsync(Utils.Utils.COMMUNITY_ID); pointsListView.ItemsSource = await CitylightPoint.GetPointsAsync(Utils.Utils.COMMUNITY_ID); }
protected async void categoryPicker_ItemSelected(object sender, EventArgs args) { try { var selectedItem = categoryPicker.SelectedItem as CitylightGroup; pointsListView.ItemsSource = await CitylightPoint.GetPointsAsync(int.Parse(selectedItem.properties.group_id)); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
protected async override void OnAppearing() { base.OnAppearing(); if (categories == null) { ActivityIndicator.IsRunning = true; categories = await CitylightGroup.GetGroupsAsync(Utils.Utils.DINING_ID); pointsListView.ItemsSource = await CitylightPoint.GetPointsAsync(Utils.Utils.DINING_ID); categoryPicker.ItemsSource = categories; ActivityIndicator.IsRunning = false; } }