Ejemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);// Get pager from layout
            ecPagerView = FindViewById <ECPagerView>(Resource.Id.ec_pager_element);

            // Generate example dataset
            IList <IECCardData> dataset = CardDataImpl.GenerateExampleData();

            var adapter = new DemoECPagerViewAdapter(this, dataset);

            adapter.HeadCardClicked += delegate {
                ecPagerView.Toggle();
            };
            ecPagerView.SetPagerViewAdapter(adapter);

            // Add background switcher to pager view
            ecPagerView.SetBackgroundSwitcherView(FindViewById <ECBackgroundSwitcherView>(Resource.Id.ec_bg_switcher_element));
        }
Ejemplo n.º 2
0
        public void InitInterface()
        {
            ExampleDataset      exampledata = new ExampleDataset();
            IList <IECCardData> dataset     = exampledata.GetDataset();
            var adapter = new DemoECPagerViewAdapter(this, dataset);


            ecPagerView = (ECPagerView)FindViewById(Resource.Id.ec_pager_element);

            adapter.HeadCardClicked += delegate
            {
                ecPagerView.Toggle();
            };

            ecPagerView.SetPagerViewAdapter(adapter);

            // Add background switcher to pager view
            ecPagerView.SetBackgroundSwitcherView(FindViewById <ECBackgroundSwitcherView>(Resource.Id.ec_bg_switcher_element));


            ItemCountView = (ItemsCountView)FindViewById(Resource.Id.items_count_view);
            ItemCountView.Update(0, 0, 5);
            ecPagerView.CardSelected += EcPagerView_CardSelected;
        }