/// <summary> /// Provides the data adapter for the RecyclerView /// This simple gets all the current tracking numbers and populates the recycler /// </summary> private void TrackingNumberDataProvider() { mBarcodeScannerList = new BarcodeScannerList(); mBarcodeScannerList.FetchUnCollected(); mRecyclerView = FindViewById <RecyclerView>(Resource.Id.recyclerView); ScrollView scrollView = FindViewById <ScrollView>(Resource.Id.scroll_view); // Plug in the linear layout manager: mLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.Vertical, true); mLayoutManager.ScrollToPosition(0); mRecyclerView.SetLayoutManager(mLayoutManager); mRecyclerView.ScrollToPosition(0); // Plug in my adapter: mAdapter = new TrackingNumberDataAdapter(mBarcodeScannerList); mRecyclerView.SetAdapter(mAdapter); mRecyclerView.ScrollToPosition(0); }
public TrackingNumberDataAdapter(BarcodeScannerList bcl) { mBarcodeScannerList = bcl; }