Exemplo n.º 1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Oferta);
            Context context = this;

            #region Rest i ladowanie listy
            mListView = FindViewById <ListView>(Resource.Id.listaProdukt);
            #region    /************ REST ****************
                        * /*
                        * REST lista = new REST(context);
                        * if (lista.listaP == null)
                        * {
                        * lista.listaP.Add(new Produkt());
                        * lista.listaP[0].Name = "brak elementow";
                        * }
                        */
            #endregion //******************************

            #region testy

            //Do testow listy
            mItems = new List <Produkt>();
            mItems.Add(new Produkt("koszulka", 2, "KOLOROWA", null));
            mItems.Add(new Produkt("glowa1", 3, "Pusta", null));
            mItems.Add(new Produkt("noga", 3, "Pusta", null));
            mItems.Add(new Produkt("szyja", 3, "Pusta", null));
            mItems.Add(new Produkt("pieta", 3, "Pusta", null));
            mItems.Add(new Produkt("lokiec", 3, "Pusta", null));
            mItems.Add(new Produkt("kark", 3, "Pusta", null));

            MyViewAdapter adapter = new MyViewAdapter(this, mItems, Resource.Layout.Oferta);

            #endregion
            //MyViewAdapter adapter = new MyViewAdapter(this, lista.listaP, Resource.Layout.Oferta);

            mListView.Adapter = adapter;
            #endregion


            // Create your application here
        }
Exemplo n.º 2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Koszyk);
            Context context = this;

            mListView = FindViewById <ListView>(Resource.Id.kosz_listview);
            MyViewAdapter adapter = new MyViewAdapter(this, Kosz.lista, Resource.Layout.Koszyk);

            mListView.Adapter = adapter;

            #region suma
            Button zatwierc = FindViewById <Button>(Resource.Id.kosz_zatwierc);
            text_suma = FindViewById <TextView>(Resource.Id.kosz_cena);
            Kosz.Set_Sum(text_suma);

            #endregion

            // Create your application here
        }