public AnnouncementsListPage() { InitializeComponent(); AnnouncementsListView.IsRefreshing = true; Device.BeginInvokeOnMainThread(async() => { var announcements = await AnnouncementsHelper.getAnnouncements(); foreach (var announcement in announcements) { announcement.prettyDate = GetPrettyDate(announcement.post); } AnnouncementsListView.ItemsSource = announcements; AnnouncementsListView.IsRefreshing = false; }); }
protected async override void OnAppearing() { announcements = await AnnouncementsHelper.getAnnouncements(); AnnouncementTitle.Text = announcements[0].publisher; AnnouncementText.Text = announcements[0].text; AnnouncementsIsloading.IsRunning = false; AnnouncementsIsloading.IsVisible = false; primaryAnnouncementCell.IsEnabled = true; var twitterdata = await TwitterHelper.getTwitterFeed(); TwitterListView.IsRefreshing = false; TwitterListView.ItemsSource = twitterdata.statuses; base.OnAppearing(); }