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)); } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_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); // progress1.setColorSchemeResources(android.R.color.holo_blue_bright); progress2.SetColorSchemeResources(Android.Resource.Color.HoloGreenLight, Android.Resource.Color.HoloOrangeLight, Android.Resource.Color.HoloRedLight); 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) { progress1.Visibility = ViewStates.Visible; progress2.Visibility = ViewStates.Invisible; } else { progress2.Progress = finalI * 10; } }, 1000 * (i + 1)); } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.splash); progressWithoutBg = FindViewById <CircleProgressBar>(Resource.Id.progressWithoutBg); progressWithoutBg.SetColorSchemeResources(Android.Resource.Color.HoloRedLight); // Create your application here }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.activity_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); // progress1.setColorSchemeResources(android.R.color.holo_blue_bright); progress2.SetColorSchemeResources(Android.Resource.Color.HoloGreenLight, Android.Resource.Color.HoloOrangeLight, Android.Resource.Color.HoloRedLight); 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) { progress1.Visibility = ViewStates.Visible; progress2.Visibility = ViewStates.Invisible; } else { progress2.Progress = finalI * 10; } }, 1000 * (i + 1)); } }