Exemple #1
0
        private FloatingActionButtonView InitializeFloatingButton()
        {
            FloatingActionButtonView floatingButton = new FloatingActionButtonView();
            EntryPopup entryPopup = new EntryPopup();

            entryPopup.SetOnBackButtonPressed(floatingButton);
            entryPopup.SetOnAppearing(floatingButton);

            floatingButton.ColorNormal  = Color.FromRgb(33, 150, 243);
            floatingButton.ColorPressed = floatingButton.ColorNormal.AddLuminosity(0.1);
            floatingButton.ColorRipple  = floatingButton.ColorNormal.AddLuminosity(0.2);
            floatingButton.ImageName    = "ic_add.png";
            AbsoluteLayout.SetLayoutFlags(floatingButton, AbsoluteLayoutFlags.PositionProportional);
            AbsoluteLayout.SetLayoutBounds(floatingButton, new Rectangle(1f, 1f, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));

            return(floatingButton);
        }
Exemple #2
0
        // Crea el floatingButton y le añade las características básicas
        private FloatingActionButtonView InitializeFloatingButton()
        {
            FloatingActionButtonView floatingButton = new FloatingActionButtonView();
            EntryPopup entryPopup = new EntryPopup();

            entryPopup.SetOnBackButtonPressed(floatingButton);
            entryPopup.SetOnAppearing(floatingButton);

            floatingButton.ColorNormal  = Color.FromRgb(33, 150, 243);
            floatingButton.ColorPressed = floatingButton.ColorNormal.AddLuminosity(0.1);
            floatingButton.ColorRipple  = floatingButton.ColorNormal.AddLuminosity(0.2);
            floatingButton.Clicked      = async(sender, args) =>
            {
                //var animate = await this.DisplayAlert("Fab", "Hide and show the Fab?", "Sure", "Not now");
                //if (!animate) return;

                entryPopup.Display(chartService, _master.GetNavigationPage);
            };
            floatingButton.ImageName = "ic_add.png";
            AbsoluteLayout.SetLayoutFlags(floatingButton, AbsoluteLayoutFlags.PositionProportional);
            AbsoluteLayout.SetLayoutBounds(floatingButton, new Rectangle(1f, 1f, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));

            return(floatingButton);
        }