protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);
            progress1 = FindViewById<CircleProgressBar> (Resource.Id.progress1);
            progress2 = FindViewById<CircleProgressBar> (Resource.Id.progress2);
            progressWithArrow = FindViewById<CircleProgressBar> (Resource.Id.progressWithArrow);
            progressWithoutBg = FindViewById<CircleProgressBar> (Resource.Id.progressWithoutBg);

            progress2.SetColorSchemeResources (Android.Resource.Color.HoloGreenLight);

            progressWithArrow.SetColorSchemeResources (Android.Resource.Color.HoloOrangeLight);
            progressWithoutBg.SetColorSchemeResources (Android.Resource.Color.HoloRedLight);

            handler = new Handler ();
            for (int i = 0; i < 10; i++) {
                int finalI = i;
                handler.PostDelayed (() => {
                    if (finalI * 10 >= 90) {
                        progress2.Visibility = ViewStates.Invisible;
                    } else {
                        progress2.Progress = finalI *10;
                    }
                }, 1000 * (i + 1));
            }
        }
Exemplo n.º 2
0
 public OvalShadow(int shadowRadius, int circleDiameter, CircleProgressBar progressBar)
     : base()
 {
     mProgressBar    = progressBar;
     mShadowPaint    = new Paint();
     mShadowRadius   = shadowRadius;
     mCircleDiameter = circleDiameter;
     mRadialGradient = new RadialGradient(mCircleDiameter / 2, mCircleDiameter / 2,
                                          mShadowRadius, new int[] { FILL_SHADOW_COLOR, Color.Transparent },
                                          null, Shader.TileMode.Clamp);
     mShadowPaint.SetShader(mRadialGradient);
 }
 public OvalShadow(int shadowRadius, int circleDiameter,CircleProgressBar progressBar)
     : base()
 {
     mProgressBar = progressBar;
     mShadowPaint = new Paint();
     mShadowRadius = shadowRadius;
     mCircleDiameter = circleDiameter;
     mRadialGradient = new RadialGradient(mCircleDiameter / 2, mCircleDiameter / 2,
         mShadowRadius, new int[] { FILL_SHADOW_COLOR, Color.Transparent },
         null, Shader.TileMode.Clamp);
     mShadowPaint.SetShader(mRadialGradient);
 }