Пример #1
0
        public App()
        {
            InitializeComponent();

            SqliteUtil.Current.CreateAllTablesAsync();

            AppCenter.Start("android=edece6f4-538e-4a97-b9f7-5a24c95a00d8;ios=8b7847a8-ceae-4e21-bc51-a9da9a6e7ecc;", typeof(Analytics), typeof(Crashes));

            ViewModelBase.Init();

            XamBottomBarPage bottomBarPage = new XamBottomBarPage()
            {
                Title = "博客园"
            };

            if (Xamarin.Forms.Device.RuntimePlatform == Xamarin.Forms.Device.Android)
            {
                bottomBarPage.BarTextColor = (Color)Application.Current.Resources["Primary"];
                bottomBarPage.FixedMode    = true;
                bottomBarPage.BarTheme     = XamBottomBarPage.BarThemeTypes.Light;
            }

            bottomBarPage.Children.Add(new ArticlesTopTabbedPage());
            bottomBarPage.Children.Add(new NewsTopTabbedPage());
            bottomBarPage.Children.Add(new StatusesTopTabbedPage());
            bottomBarPage.Children.Add(new QuestionsTopTabbedPage());
            bottomBarPage.Children.Add(new AccountPage());

            MainPage = new XamNavigationPage(bottomBarPage);
            //MainPage = new NavigationPage(new Page1() { Title = "测试" });
        }
Пример #2
0
        public App()
        {
            InitializeComponent();

            SqliteUtil.Current.CreateAllTablesAsync();

            AppCenter.Start("android=72a75e57-6edb-4ba2-aee6-4cf0ddfba501;ios=3fc5d636-dc00-46cb-b7a6-b685749e6e77;", typeof(Analytics), typeof(Crashes));

            ViewModelBase.Init();

            XamBottomBarPage bottomBarPage = new XamBottomBarPage()
            {
                Title = "²©¿ÍÔ°"
            };

            if (Xamarin.Forms.Device.RuntimePlatform == Xamarin.Forms.Device.Android)
            {
                bottomBarPage.BarTextColor = (Color)Application.Current.Resources["Primary"];
                bottomBarPage.FixedMode    = true;
                bottomBarPage.BarTheme     = XamBottomBarPage.BarThemeTypes.Light;
            }

            bottomBarPage.Children.Add(new ArticlesTopTabbedPage());
            bottomBarPage.Children.Add(new NewsTopTabbedPage());
            bottomBarPage.Children.Add(new StatusesTopTabbedPage());
            bottomBarPage.Children.Add(new QuestionsTopTabbedPage());
            bottomBarPage.Children.Add(new AccountPage());

            MainPage = new XamNavigationPage(bottomBarPage);
            //MainPage = new NavigationPage(new Page1() { Title = "²âÊÔ" });
        }
Пример #3
0
        public App()
        {
            InitializeComponent();

            AppCenter.Start("", typeof(Analytics), typeof(Crashes));
            ViewModelBase.Init();

            XamBottomBarPage bottomBarPage = new XamBottomBarPage()
            {
                Title = "和腾园"
            };

            bottomBarPage.BarTextColor = (Color)Application.Current.Resources["Primary"];
            bottomBarPage.FixedMode    = true;
            bottomBarPage.BarTheme     = XamBottomBarPage.BarThemeTypes.Light;

            bottomBarPage.Children.Add(new ArticlesTopTabbedPage());
            bottomBarPage.Children.Add(new NewsTopTabbedPage());
            //闪存
            bottomBarPage.Children.Add(new StatusesTopTabbedPage());
            bottomBarPage.Children.Add(new QuestionsTopTabbedPage());
            bottomBarPage.Children.Add(new AccountPage());

            MainPage = new NavigationPage(bottomBarPage);
            //switch (Device.RuntimePlatform)
            //{
            //    case Device.Android:
            //        MainPage = new Views.Android.RootPage();
            //        //MainPage = new Page1();
            //        break;
            //    case Device.iOS:
            //        break;
            //}
            //MainPage = new MainPage();
        }
Пример #4
0
        public App()
        {
            InitializeComponent();
            AppCenter.Start("", typeof(Analytics), typeof(Crashes));
            ViewModelBase.Init();

            XamBottomBarPage bottomBarPage = new XamBottomBarPage()
            {
                Title = "博客园"
            };

            bottomBarPage.BarTextColor = (Color)Application.Current.Resources["Primary"];
            bottomBarPage.FixedMode    = true;

            bottomBarPage.BarTheme = XamBottomBarPage.BarThemeTypes.Light;

            bottomBarPage.Children.Add(new ArticlesTopTabbedPage());
            bottomBarPage.Children.Add(new NewsTopTabbedPage());
            bottomBarPage.Children.Add(new StatusesTopTabbedPage());
            bottomBarPage.Children.Add(new QuestionsTopTabbedPage());
            bottomBarPage.Children.Add(new AccountPage());

            MainPage = new NavigationPage(bottomBarPage);
        }