Пример #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Create your application here
            itemData = new List <int> ();
            itemData.Add(Resource.Drawable.photo1);
            itemData.Add(Resource.Drawable.photo2);
            itemData.Add(Resource.Drawable.photo3);
            itemData.Add(Resource.Drawable.photo4);
            imageValue = 0;

            SetContentView(Resource.Layout.simple_circle_viewpager);

            //Set up adapter with List of photo ID as item Data
            _adapter = new FragStateSupport(SupportFragmentManager, itemData);

            //Setup pager reference
            _pager         = FindViewById <ViewPager>(Resource.Id.pager);
            _pager.Adapter = _adapter;

            //Setup CirclePageIndicator Reference
            _indicator = FindViewById <CirclePageIndicator>(Resource.Id.indicator);
            _indicator.SetViewPager(_pager);


            btn        = FindViewById <Button> (Resource.Id.myButton);
            btn.Click += HandleClick;
            btn.Text   = "Run Slider";
        }
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			// Create your application here
			itemData = new List<int> ();
			itemData.Add (Resource.Drawable.photo1);
			itemData.Add (Resource.Drawable.photo2);
			itemData.Add (Resource.Drawable.photo3);
			itemData.Add (Resource.Drawable.photo4);
			imageValue = 0;

			SetContentView(Resource.Layout.simple_circle_viewpager);

			//Set up adapter with List of photo ID as item Data
			_adapter = new FragStateSupport(SupportFragmentManager,itemData);

			//Setup pager reference
			_pager = FindViewById<ViewPager>(Resource.Id.pager);
			_pager.Adapter = _adapter;

			//Setup CirclePageIndicator Reference
			_indicator = FindViewById<CirclePageIndicator>(Resource.Id.indicator);
			_indicator.SetViewPager(_pager);


			btn = FindViewById<Button> (Resource.Id.myButton);
			btn.Click += HandleClick;
			btn.Text = "Run Slider";

		}