Beispiel #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.MainFabio);

            button     = FindViewById <Button>(Resource.Id.button1);
            buttonDemi = FindViewById <Button>(Resource.Id.demi);
            mListView  = FindViewById <ListView>(Resource.Id.mylistView);

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

            //mItems.Add("appel");

            adapter           = new myListViewAdapter(this, mItems);
            mListView.Adapter = adapter;

            button.Click        += Button_Click;
            mListView.ItemClick += MListView_ItemClick;
            buttonDemi.Click    += ButtonDemi_Click;
        }
Beispiel #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.MainFabio);

            button     = FindViewById <Button>(Resource.Id.button1);
            buttonDemi = FindViewById <Button>(Resource.Id.demi);
            mListView  = FindViewById <ListView>(Resource.Id.mylistView);


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

            adapter           = new myListViewAdapter(this, mItems);
            mListView.Adapter = adapter;

            button.Click        += Button_Click;
            mListView.ItemClick += MListView_ItemClick;
            buttonDemi.Click    += ButtonDemi_Click;
        }