public override Android.Views.View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.Inflate(Resource.Layout.fragment_promotion, container, false);

            recyclerView = view.FindViewById <RecyclerView>(Resource.Id.PromosRecyclerView);

            promotionsList = new List <spa.Data.Model.Promotion.Source.Promotion>();
            promotionsList.Add(new spa.Data.Model.Promotion.Source.Promotion("Sale 10%", 10));
            promotionsList.Add(new spa.Data.Model.Promotion.Source.Promotion("Sale 10%", 10));
            promotionsList.Add(new spa.Data.Model.Promotion.Source.Promotion("Sale 10%", 10));

            presenter = new PromotionPresenter(new NavigationService(this.Activity.Application));
            presenter.SetView(this);

            LinearLayoutManager linearLayoutManager = new LinearLayoutManager(Context);

            adapter = new PromotionsListAdapter(promotionsList, Context, presenter);
            recyclerView.SetAdapter(adapter);
            recyclerView.SetLayoutManager(linearLayoutManager);

            return(view);
        }
示例#2
0
 public Myview(View _itemView, PromotionPresenter presenter) : base(_itemView)
 {
     this.pre = presenter;
 }
示例#3
0
 public PromotionsListAdapter(List <Data.Model.Promotion.Source.Promotion> list, Context con, PromotionPresenter pre)
 {
     mList      = list;
     mContext   = con;
     mPresenter = pre;
 }