public override Android.Views.View OnCreateView(Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Android.OS.Bundle savedInstanceState) { var view = inflater.Inflate(Resource.Layout.debts_list, container, false); _listView = view.FindViewById <RecyclerView> (Resource.Id.list); var linearLayoutManager = new LinearLayoutManager(CrossCurrentActivity.Current.Activity); _listView.SetLayoutManager(linearLayoutManager); _items = Vm.GetItems(_myDebts); var adapter = new DebtsAdapter(_items, AddTransactionAction); adapter.ItemClick += OnItemClick; _listView.SetAdapter(adapter); return(view); }
private void UpdateScreen(object sender, EventArgs e) { _items.Clear(); _items.AddRange(Vm.GetItems(_myDebts)); _listView.GetAdapter().NotifyDataSetChanged(); }