コード例 #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_add_services);

            presenter = new AddServicePresenter(new NavigationService(Application));
            presenter.SetView(this);
            presenter.GetServicesByOutlet();

            var backBtn = FindViewById <ImageView>(Resource.Id.backBtn);

            backBtn.Click += delegate { backButtonClick(); };

            recyclerView = FindViewById <RecyclerView>(Resource.Id.ServicesList);
            services     = new List <Service>();

            adapter = new ServiceAdapter(services, presenter);
            LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);

            recyclerView.SetLayoutManager(linearLayoutManager);
            recyclerView.SetAdapter(adapter);
        }
コード例 #2
0
 public ServiceAdapter(List <Service> listServices, AddServicePresenter presenter)
 {
     services       = listServices;
     this.presenter = presenter;
 }