private async void yearSelectButton_ItemSelected(object sender, AdapterView.ItemSelectedEventArgs e) { Spinner yearSelectButton = (Spinner)sender; this.year = (string)yearSelectButton.GetItemAtPosition(e.Position); mAdapter = ExpandableListViewAdapter.CreateFromData(this, (await service.GetSeriesRatings(this.year, this.makeSlug, this.seriesSlug))); expandableListView.SetAdapter(mAdapter); }
public void SetData(out ExpandableListViewAdapter adapter, List <Transaction> transaction) { for (int i = 0; i < transaction.Count; i++) { names.Add(transaction[i].BeneficiaryName); mDictionary.Add(transaction[i].BeneficiaryName, transaction[i]); } adapter = new ExpandableListViewAdapter(this, names, mDictionary); }
private void SetData(out ExpandableListViewAdapter mAdapter) { int Visit_Count = Medicines.Count; for (int i = 0; i < Medicines.Count; i++) { string ATCcode = "ATC-CODE :" + Medicines[i].ATC_CODES; string Dosage = " Dosage :" + Medicines[i].Dosage; List <string> a = new List <string>(); a.Add(ATCcode); a.Add(Dosage); group.Add("Medicine: " + i.ToString()); dicMyMap.Add(group[i], a); } mAdapter = new ExpandableListViewAdapter(this, group, dicMyMap); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); _listView = FindViewById <AnimatedExpandableListView>(Resource.Id.expandableListView); _listView.GroupClick += ListView_GroupClick; _adapter = new ExpandableListViewAdapter(this, new List <GroupItem>()); _listView.SetAdapter(_adapter); _records = new List <GroupItem>(); _records = GetListGroupItem(DummyData()); _adapter.DataSource = _records; _adapter.NotifyDataSetChanged(); }
private void SetData(out ExpandableListViewAdapter mAdapter) { int Visit_Count = Diagnosis.Count; for (int i = 0; i < Diagnosis.Count; i++) { string Description = "Doctor's Notes : " + Diagnosis[i].Description; string ICDchapter = "Disease category : " + Diagnosis[i].ICD_Chapter; string ICDcode = "Disease : " + Diagnosis[i].ICD_Code; List <string> a = new List <string>(); a.Add(ICDchapter); a.Add(ICDcode); a.Add(Description); group.Add("Diagnosis: " + i.ToString()); dicMyMap.Add(group[i], a); } mAdapter = new ExpandableListViewAdapter(this, group, dicMyMap); }
protected async override void OnCreate(Bundle savedInstanceState) { service = new ApiService(ApiConfig.ApiKey); base.OnCreate(savedInstanceState); this.makeTitle = Intent.GetStringExtra("makeTitle"); this.makeSlug = Intent.GetStringExtra("makeSlug"); this.seriesTitle = Intent.GetStringExtra("seriesTitle"); this.seriesSlug = Intent.GetStringExtra("seriesSlug"); var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar); this.SupportActionBar.SetHomeButtonEnabled(true); this.SupportActionBar.SetDisplayHomeAsUpEnabled(true); this.SupportActionBar.Title = $"{this.makeTitle} {this.seriesTitle}"; this.SupportActionBar.SetHomeAsUpIndicator(Resource.Drawable.ic_close); expandableListView = FindViewById <ExpandableListView>(Resource.Id.expandableListView); if (this.AssertConnected()) { try { yearSelectButton = FindViewById <Spinner>(Resource.Id.yearSelectButton); yearSelectButton.ItemSelected += new EventHandler <AdapterView.ItemSelectedEventArgs>(yearSelectButton_ItemSelected); await loadYearSpinner(); } catch (Exception e) { DialogHelper.ShowErrorMesage(this, e); } } var data = await service.GetSeriesRatings(this.year, this.makeSlug, this.seriesSlug); expandableListView.SetAdapter(ExpandableListViewAdapter.CreateFromData(this, data)); }
private void SetData(out ExpandableListViewAdapter mAdapter) { List <string> grupA = new List <string>(); grupA.Add("A-1"); grupA.Add("A-2"); grupA.Add("A-3"); List <string> groupB = new List <string>(); groupB.Add("B-1"); groupB.Add("B-2"); groupB.Add("B-3"); groupB.Add("B-4"); group.Add("Group A"); group.Add("Group B"); dicMyMap.Add(group[0], grupA); dicMyMap.Add(group[1], groupB); mAdapter = new ExpandableListViewAdapter(this, group, dicMyMap); }