Exemple #1
0
        public override void OnActivityCreated(Bundle savedInstanceState)
        {
            base.OnActivityCreated(savedInstanceState);

            menus.Add(menuDown);
            menus.Add(menuRed);
            menus.Add(menuYellow);
            menus.Add(menuGreen);
            menus.Add(menuBlue);
            menus.Add(menuLabelsRight);

            menuYellow.MenuToggle += (object sender, FloatingActionMenu.MenuToggleEventArgs e) =>
            {
                string text = (e.Opened ? "Menu opened" : "Menu closed");
                Toast.MakeText(this.Activity, text, ToastLength.Short).Show();
            };

            fab1.Click += ActionButton_Click;
            fab2.Click += ActionButton_Click;
            fab3.Click += ActionButton_Click;

            int delay = 400;

            foreach (var menu in menus)
            {
                mUiHandler.PostDelayed(() => menu.ShowMenuButton(true), delay);
                delay += 150;
            }

            new Handler().PostDelayed(() => fabEdit.Show(true), delay + 150);

            CreateCustomAnimation();
        }
Exemple #2
0
        private void ListView_Scroll(object sender, AbsListView.ScrollEventArgs e)
        {
            if (this.hideFab)
            {
                return;
            }

            if (e.FirstVisibleItem > previousVisibleItem)
            {
                fab.Hide(true);
            }
            else if (e.FirstVisibleItem < previousVisibleItem)
            {
                fab.Show(true);
            }

            previousVisibleItem = e.FirstVisibleItem;
        }