protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.activity_main); _recycler = FindViewById <RecyclerView>(Resource.Id.recyclerView); perscription = new PerscriptionListing(); DateTime nowtime = DateTime.Now.AddMinutes(2.0); // use a linear layout manager mLayoutManager = new LinearLayoutManager(this); _recycler.SetLayoutManager(mLayoutManager); mAdapter = new PerscriptionsAdapter(perscription); _recycler.SetAdapter(mAdapter); SetAmbientEnabled(); setAlarm(nowtime); // Register the item click handler(below) with the adapter: //mAdapter.ItemClick += OnItemClick; }
// Load the adapter with the data set (photo album) at construction time: public PerscriptionsAdapter(PerscriptionListing p) { _PListing = p; }