コード例 #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.JourneyExerciseView);
            // Create your application here

            TabHost.TabSpec spec;
            TabHost.SetBackgroundColor(Color.ParseColor("#FFFFFF"));
            TabHost.TabWidget.SetBackgroundColor(Color.ParseColor("#EF678D"));

            spec = TabHost.NewTabSpec("Running");
            spec.SetIndicator("Running");
            spec.SetContent(this.CreateIntentFor(JourneyExerciseViewModel.Running));
            TabHost.AddTab(spec);


            spec = TabHost.NewTabSpec("Workout");
            spec.SetIndicator("Workout");
            spec.SetContent(this.CreateIntentFor(JourneyExerciseViewModel.Workout));
            TabHost.AddTab(spec);


            spec = TabHost.NewTabSpec("Yoga");
            spec.SetIndicator("Yoga");
            spec.SetContent(this.CreateIntentFor(JourneyExerciseViewModel.Yoga));
            TabHost.AddTab(spec);
        }
コード例 #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            // Create your application here
            //Used Slodge's Code, n=25 Tabbed, from https://github.com/MvvmCross/NPlus1DaysOfMvvmCross/tree/master/N-25-Tabbed, retrieved in 21/9/16
            TabHost.TabSpec spec;
            TabHost.SetBackgroundColor(Color.ParseColor("#FFFFFF"));
            TabHost.TabWidget.SetBackgroundColor(Color.ParseColor("#EF678D"));

            spec = TabHost.NewTabSpec("Journey");
            spec.SetIndicator("Journey");
            spec.SetContent(this.CreateIntentFor(HomeViewModel.Journey));
            TabHost.AddTab(spec);


            spec = TabHost.NewTabSpec("Goal");
            spec.SetIndicator("Goal");
            spec.SetContent(this.CreateIntentFor(HomeViewModel.Goal));
            TabHost.AddTab(spec);


            spec = TabHost.NewTabSpec("Statistic");
            spec.SetIndicator("Stats");
            spec.SetContent(this.CreateIntentFor(HomeViewModel.Statistic));
            TabHost.AddTab(spec);


            spec = TabHost.NewTabSpec("Social");
            spec.SetIndicator("Social");
            spec.SetContent(this.CreateIntentFor(HomeViewModel.Community));
            TabHost.AddTab(spec);
        }
コード例 #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.JourneyFoodView);
            // Create your application here

            TabHost.TabSpec spec;
            TabHost.SetBackgroundColor(Color.ParseColor("#FFFFFF"));
            TabHost.TabWidget.SetBackgroundColor(Color.ParseColor("#EF678D"));

            spec = TabHost.NewTabSpec("Food");
            spec.SetIndicator("Food");
            spec.SetContent(this.CreateIntentFor(JourneyFoodViewModel.Food));
            TabHost.AddTab(spec);


            spec = TabHost.NewTabSpec("Custom Food");
            spec.SetIndicator("Custom Food");
            spec.SetContent(this.CreateIntentFor(JourneyFoodViewModel.Custom_Food));
            TabHost.AddTab(spec);
        }