public override Android.Views.View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Use this to return your custom view for this Fragment View view = inflater.Inflate(Resource.Layout.fragment_home, container, false); viewPager = view.FindViewById <ViewPager>(Resource.Id.viewPager); imageAdapter = new ImageAdapter(Context); viewPager.Adapter = imageAdapter; presenter = new HomePresenter(new NavigationService(Activity.Application)); presenter.SetView(this); presenter.GetAllOutles(); spinnerLocation = view.FindViewById <Spinner>(Resource.Id.spinnerLocation); spinnerLocation.OnItemSelectedListener = this; recyclerView = view.FindViewById <RecyclerView>(Resource.Id.recyclerViewService); adapter = new ServiceAdapter(services); layoutManager = new LinearLayoutManager(Context); recyclerView.SetLayoutManager(layoutManager); recyclerView.SetAdapter(adapter); OpenGpsSettings(); return(view); }
public ServiceAdapter(List <Service> serviceList, HomePresenter presenter) { this.serviceList = serviceList; this.presenter = presenter; }