protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            mProductList = new DemiProductList();

            SetContentView(Resource.Layout.Demiactivity_main);
            mRecyclerView = FindViewById <RecyclerView>(Resource.Id.recyclerView1);

            if (this.Intent.Extras != null)
            {
                var productlist = Intent.Extras.GetStringArray("lijst");
                ListOfProducts = productlist.ToList();
            }


            button = FindViewById <Button>(Resource.Id.button1);


            //----------------------------------------------------------------------------------------
            // Layout Managing Set-up

            mLayoutManager = new GridLayoutManager(this, 2, GridLayoutManager.Vertical, false);
            mRecyclerView.SetLayoutManager(mLayoutManager);

            //----------------------------------------------------------------------------------------
            // Adapter Set-up
            mAdapter            = new DemiProductListAdapter(mProductList);
            mAdapter.ItemClick += OnItemClick;
            button.Click       += Button_Click;;
            mRecyclerView.SetAdapter(mAdapter);
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Demiactivity_main);

            mRecyclerView = FindViewById <RecyclerView>(Resource.Id.recyclerView1);

            if (this.Intent.Extras != null)
            {
                var category = (DemiProductCategory)Intent.Extras.GetInt("CategoryID");
                var group    = (DemiProductGroup)Intent.Extras.GetInt("GroupID");
                CategoryID = category;
                GroupID    = group;
            }

            mProductList = new DemiProductList(CategoryID, GroupID);

            //----------------------------------------------------------------------------------------
            // Layout Managing Set-up

            mLayoutManager = new GridLayoutManager(this, 2, GridLayoutManager.Vertical, false);
            mRecyclerView.SetLayoutManager(mLayoutManager);

            //----------------------------------------------------------------------------------------
            // Adapter Set-up
            mAdapter            = new DemiProductAdapter(mProductList);
            mAdapter.ItemClick += OnItemClick;
            mRecyclerView.SetAdapter(mAdapter);
        }
Exemple #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            mProductList = new DemiProductList();

            SetContentView(Resource.Layout.Demiactivity_main);

            mRecyclerView = FindViewById <RecyclerView>(Resource.Id.recyclerView1);

            button = FindViewById <Button>(Resource.Id.button1);

            mItems.Add(new holder()
            {
                first = "Appel", second = "2 stuks"
            });


            //----------------------------------------------------------------------------------------
            // Layout Managing Set-up

            mLayoutManager = new GridLayoutManager(this, 2, GridLayoutManager.Vertical, false);
            mRecyclerView.SetLayoutManager(mLayoutManager);

            //----------------------------------------------------------------------------------------
            // Adapter Set-up
            mAdapter            = new DemiProductListAdapter(mProductList);
            mAdapter.ItemClick += OnItemClick;
            button.Click       += Button_Click;
            mRecyclerView.SetAdapter(mAdapter);
        }
Exemple #4
0
 public DemiProductListAdapter(DemiProductList productList)
 {
     mProductList = productList;
 }
Exemple #5
0
 public DemiProductGroupListAdapter(DemiProductList grouplist)
 {
     mGroupList = grouplist;
 }