protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); _persoon = Gegevens.GetPerson(); _groep = Gegevens.CurrentGroup(); SetContentView(Resource.Layout.Betaalscherm); _toolbar = FindViewById<Toolbar>(Resource.Id.toolbar); ImageView Avatar = _toolbar.FindViewById<ImageView>(Resource.Id.Avatar); TextView Title = _toolbar.FindViewById<TextView>(Resource.Id.Title); Title.Text = _groep.groepsnaam; foreach (var lid in _persoon.KrijgSchuldGroep(_groep)) { deelnemers.Add(new ListItem(lid.Key, Resource.Drawable.iconn, lid.Value, _groep)); } _adapter = new ListItemAdapter(ListItem.Session, deelnemers); _adapter.ItemClick += OnItemClick; _adapter.ItemLongClick += (sender, e) => {}; _recyclerView = FindViewById<RecyclerView>(Resource.Id.recyclerview); _recyclerView.SetMinimumHeight(ConvertDptoPx(listItemHeight*deelnemers.Count)); _recyclerView.SetLayoutManager(new LinearLayoutManager(this)); _recyclerView.SetScrollContainer(true); _recyclerView.NestedScrollingEnabled = false; _recyclerView.SetAdapter(_adapter); SetSupportActionBar(_toolbar); SupportActionBar.Title = ""; SupportActionBar.SetDisplayHomeAsUpEnabled(true); SupportActionBar.SetDisplayShowHomeEnabled(true); }
private void MakeView(List<ListItem> _list, int state) { _adapter = new ListItemAdapter(state, _list); _recyclerView = FindViewById<RecyclerView>(Resource.Id.recyclerview); _recyclerView.SetMinimumHeight(ConvertDptoPx(listItemHeight*_list.Count)); _recyclerView.SetLayoutManager(new LinearLayoutManager(this)); _recyclerView.SetScrollContainer(true); _recyclerView.NestedScrollingEnabled = false; _recyclerView.SetAdapter(_adapter); SetSupportActionBar(_toolbar); SupportActionBar.Title = ""; SupportActionBar.SetDisplayHomeAsUpEnabled(true); SupportActionBar.SetDisplayShowHomeEnabled(true); }