private void ToggleFABs()
        {
            if (IsOpen == true)
            {
                CloseSubFABs(CoolFAB, WarmupFAB, WalkFAB, RunFAB);
                FAB.RotateTo(0, ExpandDuration, OpeningEasing);
                Backdrop.FadeTo(0, ExpandDuration);
                Device.StartTimer(TimeSpan.FromMilliseconds(ExpandDuration), () =>
                {
                    if (IsOpen == false)
                    {
                        Device.BeginInvokeOnMainThread(() =>
                        {
                            Backdrop.IsVisible = false;
                        });
                    }
                    return(false);
                });
            }
            else
            {
                OpenSubFABs((CoolFAB, 270), (WarmupFAB, 300), (WalkFAB, 330), (RunFAB, 0));
                FAB.RotateTo(225, ExpandDuration, OpeningEasing);
                Backdrop.IsVisible = true;
                Backdrop.FadeTo(0.5, ExpandDuration);
            }

            IsOpen = !IsOpen;
        }
        private async Task OpenDrawer()
        {
            await Task.WhenAll(Backdrop.FadeTo(1, duration), BottomToolbar.TranslateTo(0, 0, duration, Easing.SinIn),
                               ToolbarWrapper.TranslateTo(0, openY, duration, Easing.SinIn));

            Backdrop.InputTransparent = false;
        }
        private async Task CloseDrawer()
        {
            await Task.WhenAll(Backdrop.FadeTo(0, duration),
                               ToolbarWrapper.TranslateTo(0, 260, duration, Easing.SinIn));

            BottomToolbar.TranslationY = 0;
            Backdrop.InputTransparent  = true;
        }
示例#4
0
        async Task OpenDrawer()
        {
            await Task.WhenAll
            (
                Backdrop.FadeTo(1, length: duration),
                BottomToolbar.TranslateTo(0, openY, length: duration, easing: Easing.SinIn)
            );

            Backdrop.InputTransparent = false;
        }
示例#5
0
        async Task CloseDrawer()
        {
            await Task.WhenAll
            (
                Backdrop.FadeTo(0, length: duration),
                BottomToolbar.TranslateTo(0, 260, length: duration, easing: Easing.SinIn)
            );

            Backdrop.InputTransparent = true;
        }