예제 #1
0
        public void Hide()
        {
            if (Progress != null)
            {
                Progress.ProgressChanged -= ProgressAction;
                Progress = null;
                //_loadingView.Progress = 0d;
            }

            var anim = new AlphaAnimation(ContentView.Alpha, 0.0f);

            anim.Duration  = 250;
            anim.FillAfter = true;
            ContentView.StartAnimation(anim);

            _loadingView?.RunDismissalAnimation();

            Task.Run(async() =>
            {
                // Wait for ensuring that the dialog is created.
                // Because it sometimes crashes or freezes when executing a very short process.
                await IsDialogShownTcs.Task;
                var dialog = FragmentManager.FindFragmentByTag <LoadingPlatformDialog>(LoadingImplementation.LoadingDialogTag);
                dialog?.Dismiss();
                ContentView.RemoveFromParent();
            });
        }
예제 #2
0
        public async Task Hide()
        {
            if (Progress != null)
            {
                Progress.ProgressChanged -= ProgressAction;
                Progress = null;
                if (_loadingView != null)
                {
                    //_loadingView.Progress = 0d;
                }
            }

            await UIView.AnimateAsync(
                0.25, // duration
                () => { OverlayView.Alpha = 0; }
                );

            _loadingView?.RunDismissalAnimation();
            IsRunning = false;
        }
예제 #3
0
        public void Hide()
        {
            if (Progress != null)
            {
                Progress.ProgressChanged -= ProgressAction;
                Progress = null;
                //_loadingView.Progress = 0d;
            }

            var anim = new AlphaAnimation(ContentView.Alpha, 0.0f);

            anim.Duration  = 250;
            anim.FillAfter = true;
            ContentView.StartAnimation(anim);

            _loadingView?.RunDismissalAnimation();

            var dialog = FragmentManager.FindFragmentByTag <LoadingPlatformDialog>(LoadingImplementation.LoadingDialogTag);

            dialog?.Dismiss();
            ContentView.RemoveFromParent();
        }
예제 #4
0
        public void Hide()
        {
            if (Progress != null)
            {
                Progress.ProgressChanged -= ProgressAction;
                Progress = null;
                if (_loadingView != null)
                {
                    //_loadingView.Progress = 0d;
                }
            }

            UIView.Animate(
                0.25, // duration
                () => { OverlayView.Alpha = 0; },
                () =>
            {
                _loadingView?.RunDismissalAnimation();
                IsRunning = false;
            }
                );
        }