private RecyclerView initRecycler() { //Initialize the RecyclerView recycler = view.FindViewById <RecyclerView>(Resource.Id.BlockRecycler); layoutMgr = new GridLayoutManager(activity, 2); reportCategories = new CategoriesOfReports(); blockAdapter = new BlockAdapter(activity, reportCategories); blockAdapter.ItemClick += OnItemClick; recycler.SetLayoutManager(layoutMgr); recycler.SetAdapter(blockAdapter); return(recycler); }
// TODO Align Ctor, public , override and then private methods. // TODO Remove the activity from the adapter. public BlockAdapter(Activity activity, CategoriesOfReports reportCategories) { this.activity = activity; this.reportCategories = reportCategories; }