public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.Inflate(Resource.Layout.homeLayout, container, false); mPublicationContainer = new PublicationContainer(); mRecyclerView = view.FindViewById <RecyclerView>(Resource.Id.recyclerView); fab = view.FindViewById <FloatingActionButton>(Resource.Id.fab); //Floating action button fab.Click += (sender, args) => { var NxtAct = new Intent(view.Context, typeof(PublicationActivity)); StartActivity(NxtAct); }; // Plug in the linear layout manager: mLayoutManager = new LinearLayoutManager(this.view); mRecyclerView.SetLayoutManager(mLayoutManager); // Plug in my adapter: mAdapter = new PublicationAdapter(mPublicationContainer); mRecyclerView.SetAdapter(mAdapter); return(view); }
public PublicationAdapter(PublicationContainer publicationContainer) { mPublicationContainer = publicationContainer; }