public void SetupNavigation(NavigationTabBar navigationTabBar)
        {
            try
            {
                Models = new JavaList <NavigationTabBar.Model>
                {
                    new NavigationTabBar.Model.Builder(ContextCompat.GetDrawable(Context, Resource.Drawable.ic_tab_feed), Color.ParseColor("#ffffff")).Title(Context.GetText(Resource.String.Lbl_Feed)).Build(),
                    new NavigationTabBar.Model.Builder(ContextCompat.GetDrawable(Context, Resource.Drawable.ic_tab_playlist), Color.ParseColor("#ffffff")).Title(Context.GetText(Resource.String.Lbl_Playlist)).Build(),
                    new NavigationTabBar.Model.Builder(ContextCompat.GetDrawable(Context, Resource.Drawable.ic_tab_browse), Color.ParseColor("#ffffff")).Title(Context.GetText(Resource.String.Lbl_Browse)).Build(),
                };

                if (UserDetails.IsLogin)
                {
                    Models.Add(new NavigationTabBar.Model.Builder(ContextCompat.GetDrawable(Context, Resource.Drawable.ic_tab_library), Color.ParseColor("#ffffff")).Title(Context.GetText(Resource.String.Lbl_Library)).Build());
                    Models.Add(new NavigationTabBar.Model.Builder(ContextCompat.GetDrawable(Context, Resource.Drawable.ic_tab_profile), Color.ParseColor("#ffffff")).Title(Context.GetText(Resource.String.Lbl_Profile)).Build());
                }

                var eee = NavigationTabBar.BadgeGravity.Top;
                navigationTabBar.SetBadgeGravity(eee);
                navigationTabBar.BadgeBgColor    = Color.ParseColor(AppSettings.MainColor);
                navigationTabBar.BadgeTitleColor = Color.White;

                if (AppSettings.SetTabColoredTheme)
                {
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Feed)).Color     = Color.ParseColor(AppSettings.TabColoredColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Playlist)).Color = Color.ParseColor(AppSettings.TabColoredColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Browse)).Color   = Color.ParseColor(AppSettings.TabColoredColor);

                    if (UserDetails.IsLogin)
                    {
                        Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Library)).Color = Color.ParseColor(AppSettings.TabColoredColor);
                        Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Profile)).Color = Color.ParseColor(AppSettings.TabColoredColor);
                    }
                    navigationTabBar.BgColor       = Color.ParseColor(AppSettings.MainColor);
                    navigationTabBar.ActiveColor   = Color.White;
                    navigationTabBar.InactiveColor = Color.White;
                }
                else if (AppSettings.SetTabDarkTheme)
                {
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Feed)).Color     = Color.ParseColor(AppSettings.MainColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Playlist)).Color = Color.ParseColor(AppSettings.MainColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Browse)).Color   = Color.ParseColor(AppSettings.MainColor);
                    if (UserDetails.IsLogin)
                    {
                        Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Library)).Color = Color.ParseColor(AppSettings.MainColor);
                        Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Profile)).Color = Color.ParseColor(AppSettings.MainColor);
                    }

                    navigationTabBar.BgColor       = Color.ParseColor("#000000");
                    navigationTabBar.ActiveColor   = Color.White;
                    navigationTabBar.InactiveColor = Color.White;
                }
                else
                {
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Feed)).Color     = Color.ParseColor("#ffffff");
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Playlist)).Color = Color.ParseColor("#ffffff");
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Browse)).Color   = Color.ParseColor("#ffffff");;
                    if (UserDetails.IsLogin)
                    {
                        Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Library)).Color = Color.ParseColor("#ffffff");
                        Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Profile)).Color = Color.ParseColor("#ffffff");
                    }

                    navigationTabBar.BgColor       = Color.White;
                    navigationTabBar.ActiveColor   = Color.ParseColor(AppSettings.MainColor);
                    navigationTabBar.InactiveColor = Color.ParseColor("#bfbfbf");
                }

                navigationTabBar.Models = Models;

                navigationTabBar.IsScaled         = false;
                navigationTabBar.IconSizeFraction = (float)0.450;
                navigationTabBar.BehaviorEnabled  = true;

                //navigationTabBar.SetBadgePosition(NavigationTabBar.BadgePosition.Center);
                if (AppSettings.SetTabIsTitledWithText)
                {
                    navigationTabBar.SetTitleMode(NavigationTabBar.TitleMode.All);
                    navigationTabBar.IsTitled = true;
                }

                navigationTabBar.StartTabSelected += NavigationTabBarOnStartTabSelected;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Beispiel #2
0
        public void SetupNavigation(NavigationTabBar navigationTabBar)
        {
            try
            {
                Models = new JavaList <NavigationTabBar.Model>
                {
                    new NavigationTabBar.Model.Builder(ContextCompat.GetDrawable(Context, Resource.Drawable.ic_tab_cards), Color.ParseColor("#ffffff")).Title(Context.GetText(Resource.String.Lbl_Cards)).Build()
                };

                if (AppSettings.ShowTrending)
                {
                    Models.Add(new NavigationTabBar.Model.Builder(ContextCompat.GetDrawable(Context, Resource.Drawable.ic_tab_trending), Color.ParseColor("#ffffff")).Title(Context.GetText(Resource.String.Lbl_Trending)).Build());
                }

                Models.Add(new NavigationTabBar.Model.Builder(ContextCompat.GetDrawable(Context, Resource.Drawable.ic_tab_notification), Color.ParseColor("#ffffff")).Title(Context.GetText(Resource.String.Lbl_Notifications)).Build());
                Models.Add(new NavigationTabBar.Model.Builder(ContextCompat.GetDrawable(Context, Resource.Drawable.ic_tab_messages), Color.ParseColor("#ffffff")).Title(Context.GetText(Resource.String.Lbl_messages)).Build());
                Models.Add(new NavigationTabBar.Model.Builder(ContextCompat.GetDrawable(Context, Resource.Drawable.ic_tab_profile), Color.ParseColor("#ffffff")).Title(Context.GetText(Resource.String.Lbl_Profile)).Build());


                var eee = NavigationTabBar.BadgeGravity.Top;
                navigationTabBar.SetBadgeGravity(eee);
                navigationTabBar.BadgeBgColor    = Color.ParseColor(AppSettings.MainColor);
                navigationTabBar.BadgeTitleColor = Color.White;


                if (AppSettings.SetTabColoredTheme)
                {
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Cards)).Color = Color.ParseColor(AppSettings.TabColoredColor);

                    if (AppSettings.ShowTrending)
                    {
                        Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Trending)).Color = Color.ParseColor(AppSettings.TabColoredColor);
                    }

                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Notifications)).Color = Color.ParseColor(AppSettings.TabColoredColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_messages)).Color      = Color.ParseColor(AppSettings.TabColoredColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Profile)).Color       = Color.ParseColor(AppSettings.TabColoredColor);

                    navigationTabBar.BgColor       = Color.ParseColor(AppSettings.MainColor);
                    navigationTabBar.ActiveColor   = Color.White;
                    navigationTabBar.InactiveColor = Color.White;
                }
                else if (AppSettings.SetTabDarkTheme)
                {
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Cards)).Color = Color.ParseColor(AppSettings.MainColor);

                    if (AppSettings.ShowTrending)
                    {
                        Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Trending)).Color = Color.ParseColor(AppSettings.MainColor);
                    }

                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Notifications)).Color = Color.ParseColor(AppSettings.MainColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_messages)).Color      = Color.ParseColor(AppSettings.MainColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Profile)).Color       = Color.ParseColor(AppSettings.MainColor);

                    navigationTabBar.BgColor       = Color.ParseColor("#000000");
                    navigationTabBar.ActiveColor   = Color.White;
                    navigationTabBar.InactiveColor = Color.White;
                }
                else
                {
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Cards)).Color = Color.ParseColor("#ffffff");

                    if (AppSettings.ShowTrending)
                    {
                        Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Trending)).Color = Color.ParseColor("#ffffff");
                    }

                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Notifications)).Color = Color.ParseColor("#ffffff");
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_messages)).Color      = Color.ParseColor("#ffffff");
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Profile)).Color       = Color.ParseColor("#ffffff");

                    navigationTabBar.BgColor       = Color.White;
                    navigationTabBar.ActiveColor   = Color.ParseColor(AppSettings.MainColor);
                    navigationTabBar.InactiveColor = Color.ParseColor("#bfbfbf");
                }

                navigationTabBar.Models = Models;


                navigationTabBar.IsScaled         = false;
                navigationTabBar.IconSizeFraction = (float)0.450;

                //navigationTabBar.SetBadgePosition(NavigationTabBar.BadgePosition.Center);
                if (AppSettings.SetTabIsTitledWithText)
                {
                    navigationTabBar.SetTitleMode(NavigationTabBar.TitleMode.All);
                    navigationTabBar.IsTitled = true;
                }

                navigationTabBar.StartTabSelected += NavigationTabBarOnStartTabSelected;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Beispiel #3
0
        public void SetupNavigation(NavigationTabBar navigationTabBar)
        {
            try
            {
                Models = new JavaList <NavigationTabBar.Model>
                {
                    new NavigationTabBar.Model.Builder(ContextCompat.GetDrawable(Context, Resource.Drawable.ic_tab_home), Color.ParseColor("#ffffff")).Title(Context.GetText(Resource.String.Lbl_News_Feed)).Build(),
                    new NavigationTabBar.Model.Builder(ContextCompat.GetDrawable(Context, Resource.Drawable.ic_explore_tool), Color.ParseColor("#ffffff")).Title(Context.GetString(Resource.String.Lbl_Explore)).Build(),
                    new NavigationTabBar.Model.Builder(ContextCompat.GetDrawable(Context, Resource.Drawable.ic_add), Color.ParseColor("#ffffff")).Title(Context.GetString(Resource.String.Lbl_Add_Post)).Build(),
                    new NavigationTabBar.Model.Builder(ContextCompat.GetDrawable(Context, Resource.Drawable.ic_action_notification), Color.ParseColor("#ffffff")).Title(Context.GetText(Resource.String.Lbl_Notifications)).BadgeTitle("0").Build(),
                    new NavigationTabBar.Model.Builder(ContextCompat.GetDrawable(Context, Resource.Drawable.ic_tab_user_profile), Color.ParseColor("#ffffff")).Title(Context.GetText(Resource.String.Lbl_More)).Build()
                };

                var eee = NavigationTabBar.BadgeGravity.Top;
                navigationTabBar.SetBadgeGravity(eee);
                navigationTabBar.BadgeBgColor    = Color.ParseColor(AppSettings.MainColor);
                navigationTabBar.BadgeTitleColor = Color.White;

                if (AppSettings.SetTabColoredTheme)
                {
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_News_Feed)).Color     = Color.ParseColor(AppSettings.TabColoredColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Explore)).Color       = Color.ParseColor(AppSettings.TabColoredColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Add_Post)).Color      = Color.ParseColor(AppSettings.TabColoredColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Notifications)).Color = Color.ParseColor(AppSettings.TabColoredColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_More)).Color          = Color.ParseColor(AppSettings.TabColoredColor);

                    navigationTabBar.BgColor       = Color.ParseColor(AppSettings.MainColor);
                    navigationTabBar.ActiveColor   = Color.White;
                    navigationTabBar.InactiveColor = Color.White;
                }
                else if (AppSettings.SetTabDarkTheme)
                {
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_News_Feed)).Color     = Color.ParseColor(AppSettings.MainColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Explore)).Color       = Color.ParseColor(AppSettings.MainColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Add_Post)).Color      = Color.ParseColor(AppSettings.MainColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Notifications)).Color = Color.ParseColor(AppSettings.MainColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_More)).Color          = Color.ParseColor(AppSettings.MainColor);
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Add_Post)).Color      = Color.ParseColor(AppSettings.MainColor);

                    navigationTabBar.BgColor = Color.ParseColor("#000000");
                    //navigationTabBar.BgColor = Color.ParseColor("#282828");
                    navigationTabBar.ActiveColor   = Color.White;
                    navigationTabBar.InactiveColor = Color.White;
                }
                else
                {
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_News_Feed)).Color     = Color.ParseColor("#ffffff");
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Explore)).Color       = Color.ParseColor("#ffffff");
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Add_Post)).Color      = Color.ParseColor("#ffffff");
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Notifications)).Color = Color.ParseColor("#ffffff");
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_More)).Color          = Color.ParseColor("#ffffff");
                    Models.First(a => a.Title == Context.GetText(Resource.String.Lbl_Add_Post)).Color      = Color.ParseColor("#ffffff");


                    navigationTabBar.BgColor       = Color.White;
                    navigationTabBar.ActiveColor   = Color.ParseColor(AppSettings.MainColor);
                    navigationTabBar.InactiveColor = Color.ParseColor("#bfbfbf");
                }
                navigationTabBar.Models = Models;


                navigationTabBar.IsScaled         = false;
                navigationTabBar.IconSizeFraction = (float)0.450;
                navigationTabBar.BehaviorEnabled  = false;
                //navigationTabBar.SetBadgePosition(NavigationTabBar.BadgePosition.Center);
                if (AppSettings.SetTabIsTitledWithText)
                {
                    navigationTabBar.SetTitleMode(NavigationTabBar.TitleMode.All);
                    navigationTabBar.IsTitled = true;
                }

                navigationTabBar.StartTabSelected += NavigationTabBarOnStartTabSelected;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }