protected override void OnCreate(Bundle bundle) { PersonSectionAdapter = new ProspectListAdapter(this); base.OnCreate(bundle); this.AddToolbar(Resource.String.prospects_list_title, true); Task.Run ( async() => await InvalidateOverdueNotifications() ); }
public override void AdapterItemClick(ListView sender, AdapterView.ItemClickEventArgs args) { ProspectListAdapter adapter = null; if (sender != null) { adapter = sender.Adapter as ProspectListAdapter; } if (adapter == null) { Logger.Error("No Adapter found of type [ProspectListAdapter] something's wrong with setup."); return; } if (adapter.GetItem(args.Position) != null) { try { var prospect = adapter.GetItem(args.Position).ToNetObject <ProspectItem>(); if (GetString(Resource.String.no_search_results).Equals(prospect.SearchResult.FirstName)) { return; } Intent intent = new ProspectDetailsHelper().GetPropsectDetailIntent(this, prospect); intent.PutExtra(ProspectDetailActivity.ProspectDetailsOrigin, ProspectDetailsOrigin.ProspectListItemClick.ToString()); this.StartActivityForResult(intent, 1); } catch (InvalidCastException ice) { Logger.Error("Header clicked:" + ice.Message); } } }