Пример #1
0
        /// <summary>
        /// called whenever the window focus changes
        /// </summary>
        /// <param name="hasFocus">whether the window now has focus</param>
        public override void OnWindowFocusChanged(bool hasFocus)
        {
            base.OnWindowFocusChanged(hasFocus);

            if (customProgressDialog == null)
            {
                return;
            }

            ImageView         imageView         = customProgressDialog.FindViewById <ImageView>(Resource.Id.loadingImageView);
            AnimationDrawable animationDrawable = (AnimationDrawable)imageView.Background;

            //start the animation
            animationDrawable.Start();
        }