public static void SetupTabItems(this ExtendedTabbedPageRenderer renderer, BottomNavigationViewEx bottomNav)
        {
            var element = renderer.Element;
            var menu    = (BottomNavigationMenu)bottomNav.Menu;

            menu.ClearAll();

            var tabsCount = Math.Min(element.Children.Count, bottomNav.MaxItemCount);

            for (int i = 0; i < tabsCount; i++)
            {
                var page     = element.Children[i];
                var menuItem = menu.Add(0, i, 0, page.Title);
                var setter   = ExtendedTabbedPageRenderer.MenuItemIconSetter ?? ExtendedTabbedPageRenderer.DefaultMenuItemIconSetter;
                setter.Invoke(menuItem, page.Icon, renderer.LastSelectedIndex == i);
            }

            if (element.Children.Count > 0)
            {
                bottomNav.EnableShiftingMode(false);
                bottomNav.EnableItemShiftingMode(false);
                bottomNav.EnableAnimation(false);
                bottomNav.SetTextVisibility(false);
                bottomNav.SetBackgroundResource(Resource.Drawable.bottom_nav_bg);
                bottomNav.SetIconSize(24, 24);
                bottomNav.SetIconsMarginTop(32);

                if (element.Children.Count > 3)
                {
                    bottomNav.SetIconSizeAt(3, 29, 29);
                    bottomNav.SetIconMarginTop(3, 28);
                }

                var stateList = new global::Android.Content.Res.ColorStateList(
                    new int[][] {
                    new int[] { global::Android.Resource.Attribute.StateChecked },
                    new int[] { global::Android.Resource.Attribute.StateEnabled }
                },
                    new int[] {
                    element.TintColor.ToAndroid(),      // Selected
                    Color.FromHex("A1A1A1").ToAndroid() // Normal
                });

                bottomNav.ItemIconTintList = stateList;
            }
        }