Beispiel #1
0
        public override void LoadView()
        {
            base.LoadView();
            var style = View.GetStyle();

            View.TintColor            = style.AccentColor;
            TableView.RowHeight       = 20;
            TableView.TableFooterView = new UIView(new CGRect(0, 0, 320, NowPlayingViewController.TopBarHeight));
            TableView.SeparatorStyle  = UITableViewCellSeparatorStyle.None;

            if (NavigationController == null)
            {
                return;
            }
            NavigationController.NavigationBar.TitleTextAttributes = new UIStringAttributes
            {
                ForegroundColor = style.AccentColor
            };
            if (NavigationController.ViewControllers.Length == 1)
            {
                menuButton = new UIBarButtonItem(Images.MenuImage, UIBarButtonItemStyle.Plain,
                                                 (s, e) => { NotificationManager.Shared.ProcToggleMenu(); })
                {
                    AccessibilityIdentifier = "menu"
                };
                NavigationItem.LeftBarButtonItem = BaseViewController.ShouldShowMenuButton(this) ? menuButton : null;
            }
            //if(Device.IsIos8)
            //	NavigationController.HidesBarsOnSwipe = true;
        }
        public override void LoadView()
        {
            base.LoadView();
            var style = View.GetStyle();

            View.TintColor            = style.AccentColor;
            TableView.TableFooterView = new UIView(new CGRect(0, 0, 320, NowPlayingViewController.MinVideoHeight));
            TableView.SectionIndexMinimumDisplayRowCount = 30;
            TableView.SectionIndexBackgroundColor        = UIColor.Clear;
            if (Device.IsIos9)
            {
                TableView.CellLayoutMarginsFollowReadableWidth = false;
            }

            if (NavigationController == null)
            {
                return;
            }
            NavigationController.NavigationBar.TitleTextAttributes = new UIStringAttributes
            {
                ForegroundColor = style.AccentColor
            };
            if (NavigationController.ViewControllers.Length == 1 && !ShouldHideMenu)
            {
                menuButton = new UIBarButtonItem(Images.MenuImage, UIBarButtonItemStyle.Plain,
                                                 (s, e) => { NotificationManager.Shared.ProcToggleMenu(); })
                {
                    AccessibilityIdentifier = "menu",
                };
                NavigationItem.LeftBarButtonItem = BaseViewController.ShouldShowMenuButton(this) ? menuButton : null;
            }

            //if(Device.IsIos8)
            //	NavigationController.HidesBarsOnSwipe = true;
        }
Beispiel #3
0
        public override void LoadView()
        {
            base.LoadView();

            this.StyleViewController();
            if (NavigationController == null)
            {
                return;
            }
            var style = View.GetStyle();

            NavigationController.NavigationBar.TitleTextAttributes = new UIStringAttributes
            {
                ForegroundColor = style.AccentColor
            };
            if (NavigationController.ViewControllers.Length == 1 && !ShouldHideMenu)
            {
                menuButton = new UIBarButtonItem(Images.MenuImage, UIBarButtonItemStyle.Plain,
                                                 (s, e) => { NotificationManager.Shared.ProcToggleMenu(); })
                {
                    AccessibilityIdentifier = "menu",
                };
                NavigationItem.LeftBarButtonItem = BaseViewController.ShouldShowMenuButton(this) ? menuButton : null;
            }

            TableView.EstimatedSectionFooterHeight = 0;
            TableView.EstimatedSectionHeaderHeight = 0;
        }
Beispiel #4
0
        public override void DidRotate(UIInterfaceOrientation fromInterfaceOrientation)
        {
            base.DidRotate(fromInterfaceOrientation);

            if (ShouldHideMenu)
            {
                return;
            }
            NavigationItem.LeftBarButtonItem = BaseViewController.ShouldShowMenuButton(this) ? menuButton : null;
        }
Beispiel #5
0
 public override void LoadView()
 {
     Model      = new SearchViewModel();
     View       = new SearchView(this);
     menuButton = new UIBarButtonItem(Images.MenuImage, UIBarButtonItemStyle.Plain,
                                      (s, e) => { NotificationManager.Shared.ProcToggleMenu(); })
     {
         AccessibilityIdentifier = "menu",
     };
     NavigationItem.LeftBarButtonItem = BaseViewController.ShouldShowMenuButton(this) ? menuButton : null;
 }
        public override void LoadView()
        {
            base.LoadView();
            var style = View.GetStyle();

            SelectedTitleColor = style.AccentColor;
            TitleFont          = SelectedTitleFont = style.ButtonTextFont;
            ViewControllers    = new UIViewController[]
            {
                new RadioStationTab
                {
                    Title      = Strings.RecentStations,
                    IsIncluded = false,
                },
                new RadioStationTab
                {
                    Title      = Strings.MyStations,
                    IsIncluded = true,
                },
            };

            if (NavigationController == null)
            {
                return;
            }
            NavigationController.NavigationBar.TitleTextAttributes = new UIStringAttributes
            {
                ForegroundColor = style.AccentColor
            };

            if (NavigationController.ViewControllers.Length != 1)
            {
                return;
            }

            menuButton = new UIBarButtonItem(Images.MenuImage, UIBarButtonItemStyle.Plain,
                                             (s, e) => { NotificationManager.Shared.ProcToggleMenu(); })
            {
                AccessibilityIdentifier = "menu",
            };
            NavigationItem.LeftBarButtonItem  = BaseViewController.ShouldShowMenuButton(this) ? menuButton : null;
            NavigationItem.RightBarButtonItem = new UIBarButtonItem(Images.DiceImage, UIBarButtonItemStyle.Plain, async(sender, e) =>
            {
                await PlaybackManager.Shared.Play(new RadioStation("I'm Feeling Lucky")
                {
                    Id = "IFL",
                });
            })
            {
                AccessibilityIdentifier = "IFL",
                AccessibilityLabel      = "Play I'm Feeling Lucky Station",
            };
        }