// --- Components /// <summary> /// Constructs the Table responsible for sending events and /// showing statistics about the Tracker /// </summary> /// <returns></returns> private StackLayout BuildTrackFunctionsView() { // --- Send Buttons var floodCell = new ActionImageCell("Send all event types", IconLoader.Load(Utils.Icon.Send)); floodCell.Tapped += (s, e) => { TrackEvents(); }; // --- Statistics _statisticsTableSection = new StatisticsTableSection(); _statisticsTableSection.StartUpdater(); _statisticsTableSection.UpdateStatistics(); // --- Assemblew View var settingsTable = new TableView { Intent = TableIntent.Settings, Root = new TableRoot { new TableSection("Track Functions") { floodCell }, _statisticsTableSection.Section } }; return(new StackLayout { Children = { settingsTable }, VerticalOptions = LayoutOptions.FillAndExpand }); }
// --- Components /// <summary> /// Constructs the Table responsible for sending events and /// showing statistics about the Tracker /// </summary> /// <returns></returns> private StackLayout BuildTrackFunctionsView() { // --- Send Buttons var icSendImage = IconLoader.Load(Utils.Icon.Send); var selfDescribingCell = new ActionImageCell("TrackSelfDescribing", icSendImage); selfDescribingCell.Tapped += (s, e) => { TrackEvent(0); }; var pageViewCell = new ActionImageCell("TrackPageView", icSendImage); pageViewCell.Tapped += (s, e) => { TrackEvent(1); }; var screenViewCell = new ActionImageCell("TrackScreenView", icSendImage); screenViewCell.Tapped += (s, e) => { TrackEvent(2); }; var timingCell = new ActionImageCell("TrackTiming", icSendImage); timingCell.Tapped += (s, e) => { TrackEvent(3); }; var structCell = new ActionImageCell("TrackStructEvent", icSendImage); structCell.Tapped += (s, e) => { TrackEvent(4); }; var ecommerceTransactionCell = new ActionImageCell("TrackEcommerceTransaction", icSendImage); ecommerceTransactionCell.Tapped += (s, e) => { TrackEvent(5); }; // --- Statistics _statisticsTableSection = new StatisticsTableSection(); _statisticsTableSection.StartUpdater(); _statisticsTableSection.UpdateStatistics(); // --- Assemblew View var settingsTable = new TableView { Intent = TableIntent.Settings, Root = new TableRoot { new TableSection("Event Track Functions") { selfDescribingCell, pageViewCell, screenViewCell, timingCell, structCell, ecommerceTransactionCell }, _statisticsTableSection.Section } }; return(new StackLayout { Children = { settingsTable }, VerticalOptions = LayoutOptions.FillAndExpand }); }