protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); var progressBar = (ProgressBar)FindViewById(Resource.Id.spin_kit); var doubleBounce = new DoubleBounce(); progressBar.IndeterminateDrawable = doubleBounce; }
public override void OnViewCreated(View view, Bundle savedInstanceState) { base.OnViewCreated(view, savedInstanceState); //ProgressBar var progressBar = view.FindViewById <ProgressBar>(Resource.Id.progress); var doubleBounce = new DoubleBounce(); doubleBounce.SetBounds(0, 0, 100, 100); doubleBounce.Color = (int)Colors.Values[7]; progressBar.SetIndeterminateDrawableTiled(doubleBounce); //Button var button = view.FindViewById <Button>(Resource.Id.button); _mWaveDrawable = new Wave(); _mWaveDrawable.SetBounds(0, 0, 100, 100); //noinspection deprecation _mWaveDrawable.Color = Resources.GetColor(Resource.Color.colorAccent); button.SetCompoundDrawables(_mWaveDrawable, null, null, null); //TextView TextView textView = view.FindViewById <TextView>(Resource.Id.text); _mCircleDrawable = new Circle(); _mCircleDrawable.SetBounds(0, 0, 100, 100); _mCircleDrawable.Color = Color.White; textView.SetCompoundDrawables(null, null, _mCircleDrawable, null); textView.SetBackgroundColor(new Color((int)Colors.Values[2])); //ImageView ImageView imageView = view.FindViewById <ImageView>(Resource.Id.image); _mChasingDotsDrawable = new ChasingDots(); _mChasingDotsDrawable.Color = Color.White; imageView.SetImageDrawable(_mChasingDotsDrawable); imageView.SetBackgroundColor(new Color((int)Colors.Values[0])); }