예제 #1
0
        void OnStartProgressTapped(object sender, EventArgs e)
        {
            standardProgressView.Progress = 0;
            bigRadialProgressView.Reset();
            smallRadialProgressView.Reset();
            tinyRadialProgressView.Reset();

            if (timer != null)
            {
                timer.Invalidate();
                timer = null;
            }

            // Start a timer to increment progress regularly until complete
            timer = NSTimer.CreateRepeatingScheduledTimer(1.0 / 30.0, () => {
                bigRadialProgressView.Value   += 0.005f;
                smallRadialProgressView.Value += 0.005f;
                tinyRadialProgressView.Value  += 0.005f;
                standardProgressView.Progress += 0.005f;

                if (bigRadialProgressView.IsDone)
                {
                    timer.Invalidate();
                    timer = null;
                }
            });
        }
예제 #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.rateus_layout);
            resultTextView = FindViewById <TextView>(Resource.Id.resultText);
            imageView      = FindViewById <ImageView>(Resource.Id.imageView1);
            pictureButton  = FindViewById <Button>(Resource.Id.GetPictureButton);
            progressView   = FindViewById <RadialProgressView>(Resource.Id.progressView);

            progressView.MinValue = 0;
            progressView.MaxValue = 5;
            if (progressView.IsDone)
            {
                progressView.Reset();
            }

            alert = new Builder(this);

            if (IsThereAnAppToTakePictures())
            {
                CreateDirectoryForPictures();
                pictureButton.Click += OnActionClick;
            }
        }