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";

		}
        void SetupViewPagerIndicator()
        {
            //_indicator.SetViewPager(_viewpageer);
            var density = Resources.DisplayMetrics.Density;

            ((LinePageIndicator)_indicator).LineWidth       = 30 * density;
            ((LinePageIndicator)_indicator).SelectedColor   = Color.ParseColor("#E5E5E5");
            ((LinePageIndicator)_indicator).UnselectedColor = Color.ParseColor("#BC9F43");
            ((LinePageIndicator)_indicator).StrokeWidth     = 4 * density;
            _indicator.SetViewPager(_viewpageer);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Main);

            mAdapter = new TestFragmentPagerAdapter(SupportFragmentManager);

            mPager         = FindViewById <ViewPager>(Resource.Id.pager);
            mPager.Adapter = mAdapter;

            mTitleIndicator = FindViewById <TitlePageIndicator>(Resource.Id.titleIndicator);
            mTitleIndicator.SetViewPager(mPager);

            mCircleIndicator = FindViewById <CirclePageIndicator>(Resource.Id.circleIndicator);
            mCircleIndicator.SetViewPager(mPager);
        }
Exemple #5
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Main);
            ActionBar.Title = string.Empty;

            Typeface face = Typeface.CreateFromAsset(Assets, "fonts/segoeui.ttf");


            var titleText = FindViewById <TextView> (Resource.Id.titleText);

            titleDays = FindViewById <TextView> (Resource.Id.titleDays);

            if (titleText != null && face != null)
            {
                titleText.Typeface = face;
                titleDays.Typeface = face;
            }

            adapter = new ScreenSlidePagerAdapter(SupportFragmentManager);

            pager         = FindViewById <ViewPager>(Resource.Id.pager);
            pager.Adapter = adapter;

            indicator = FindViewById <TitlePageIndicator>(Resource.Id.indicator);
            indicator.SetViewPager(pager);
            pager.OffscreenPageLimit = (adapter.Count);

            timer          = new System.Timers.Timer(1000);
            timer.Elapsed += HandleElapsed;

            _time.PropertyChanged += (sender, e) => {
                if (e.PropertyName != "DaysUntil")
                {
                    return;
                }
                RunOnUiThread(() => {
                    titleDays.Text = _time.DaysUntil;
                });
            };
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.AppIntro);
            DinamikStatusBarColor dinamikStatusBarColor = new DinamikStatusBarColor();

            dinamikStatusBarColor.Pembe(this);
            Transformiew = FindViewById <RelativeLayout>(Resource.Id.rootview);
            viewpager    = FindViewById <ViewPager>(Resource.Id.viewPager1);
            viepageratama();
            _indicator = FindViewById <CirclePageIndicator>(Resource.Id.circlePageIndicator1);
            _indicator.SetViewPager(viewpager);
            ((CirclePageIndicator)_indicator).Snap = true;
            var density = Resources.DisplayMetrics.Density;

            //((CirclePageIndicator)_indicator).SetBackgroundColor(Color.Argb(255, 204, 204, 204));
            ((CirclePageIndicator)_indicator).Radius      = 5 * density;
            ((CirclePageIndicator)_indicator).PageColor   = Color.Argb(255, 255, 255, 255);
            ((CirclePageIndicator)_indicator).FillColor   = Color.Transparent;
            ((CirclePageIndicator)_indicator).StrokeColor = Color.White;
            ((CirclePageIndicator)_indicator).StrokeWidth = 2f;

            //BaslangicIslemleri();
        }