protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); //RECYCLERVIEW rv = FindViewById <RecyclerView>(Resource.Id.mRecylcerID); //SET ITS PROPERTIES //MAKE IT STAGGERED rv.SetLayoutManager(new StaggeredGridLayoutManager(2, 1)); rv.SetItemAnimator(new DefaultItemAnimator()); //ADAPTER adapter = new MyAdapter(TVShowsCollection.GetTvShows()); rv.SetAdapter(adapter); //ITEMCLICK adapter.ItemClick += onItemClick; }
void onItemClick(object sender, int pos) { Toast.MakeText(this, TVShowsCollection.GetTvShows()[pos].Name, ToastLength.Short).Show(); }