Exemple #1
0
        private TabInfo CreateTabInfo(object item)
        {
            string id      = Guid.NewGuid().ToString("n");
            var    spec    = TabHost.NewTabSpec(id);
            var    tabInfo = new TabInfo(item, spec, GetContent(item));

            _tabToContent[id] = tabInfo;
            SetIndicator(spec, item);
            spec.SetContent(_tabFactory);
            spec.SetDataContext(item);
            return(tabInfo);
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.tabs_scroll);

            for (int i = 1; i <= 30; i++)
            {
                String name = "Tab " + i;
                TabHost.AddTab(TabHost.NewTabSpec(name).SetIndicator(name).SetContent(this));
            }
        }
Exemple #3
0
        /// <summary>
        /// Initialize the tabs and set views and identifiers for the tabs
        /// </summary>
        /// <param name="view">View.</param>
        public void InitializeTab(View view)
        {
            TabHost.TabSpec spec1 = mTabHost.NewTabSpec("Monthly");
            spec1.SetContent(Resource.Id.realtabcontent);
            spec1.SetIndicator(this.Activity.LayoutInflater.Inflate(Resource.Layout.statistic_tab_button_month, null));  //"Monthly", Resource.Drawable.statistic_date48);
            mTabHost.AddTab(spec1);

            TabHost.TabSpec spec2 = mTabHost.NewTabSpec("By Date");
            spec2.SetContent(Resource.Id.realtabcontent);
            spec2.SetIndicator(this.Activity.LayoutInflater.Inflate(Resource.Layout.statistic_tab_button_date, null));  //"By Date", Resource.Drawable.statistic_month);
            mTabHost.AddTab(spec2);

            for (int i = 0; i < mTabHost.TabWidget.ChildCount; i++)
            {
                View tab = mTabHost.TabWidget.GetChildAt(i);
                tab.SetBackgroundResource(Resource.Drawable.main_button_selector);
                tab.SetMinimumHeight(18);
            }

            mTabHost.SetCurrentTabByTag("By Date");
            mTabHost.SetCurrentTabByTag("Monthly");
        }
        private void CreateTab(Type activity, string tag, string label)
        {
            var intent = new Intent(this, activity);

            intent.AddFlags(ActivityFlags.NewTask);

            var spec = TabHost.NewTabSpec(tag);

            spec.SetIndicator(label);
            spec.SetContent(intent);

            TabHost.AddTab(spec);
        }
        private void CreateTab(Type activityType, string tag, string label, int drawableId)
        {
            var intent = new Intent(this, activityType);

            intent.AddFlags(ActivityFlags.NewTask);

            var spec         = TabHost.NewTabSpec(tag);
            var drawableIcon = Resources.GetDrawable(drawableId);

            spec.SetIndicator(label, drawableIcon);
            spec.SetContent(intent);
            TabHost.AddTab(spec);
        }
        private TabHost.TabSpec GetTab(string name, string title, Type type, int iconId)
        {
            var intent = new Intent(this, type);

            intent.AddFlags(ActivityFlags.NewTask);

            var spec = TabHost.NewTabSpec(name);

            spec.SetIndicator(title, Resources.GetDrawable(iconId));
            spec.SetContent(intent);

            return(spec);
        }
Exemple #7
0
        private void init_BuySellTabs()
        {
            TabHost tabHost = (TabHost)FindViewById(Resource.Id.BuySellTabHost);

            // инициализация
            tabHost.Setup();
            TabHost.TabSpec tabSpec;
            //tabHost.SetBackgroundColor(new Color(240, 221, 52));
            tabSpec = tabHost.NewTabSpec(Resources.GetString(Resource.String.BuySellTab1));
            tabSpec.SetIndicator(Resources.GetString(Resource.String.BuySellTab1));
            tabSpec.SetContent(Resource.Id.BuySellTab1);
            tabHost.AddTab(tabSpec);
            tabSpec = tabHost.NewTabSpec(Resources.GetString(Resource.String.BuySellTab2));
            tabSpec.SetIndicator(Resources.GetString(Resource.String.BuySellTab2));
            tabSpec.SetContent(Resource.Id.BuySellTab2);
            tabHost.AddTab(tabSpec);
            //tabHost.TabWidget.SetBackgroundDrawable(GetDrawable(Resource.Drawable.TabSelector));
            tabHost.TabWidget.StripEnabled = false;

            for (int i = 0; i < tabHost.TabWidget.ChildCount; i++)
            {
                View v = tabHost.TabWidget.GetChildAt(i);
                v.SetBackgroundResource(Resource.Drawable.TabSelector);
                RelativeLayout rl = (RelativeLayout)tabHost.TabWidget.GetChildAt(i);
                rl.SetGravity(GravityFlags.CenterVertical);

                TextView textView = (TextView)rl.GetChildAt(1);
                textView.SetTextColor(Resources.GetColorStateList(Resource.Drawable.TabTextColorLogic));
                textView.SetMaxHeight(100);
                var xyi = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MatchParent, RelativeLayout.LayoutParams.MatchParent);

                textView.LayoutParameters = xyi;

                textView.SetTypeface(null, TypefaceStyle.Bold);
                textView.Gravity = GravityFlags.Center;
                textView.SetTextSize(Android.Util.ComplexUnitType.Dip, 20);
                //tabHost.TabWidget.GetChildAt(i).LayoutParameters.Height = 120;
            }
        }
Exemple #8
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            //載入頁面
            SetContentView(Resource.Layout.Main);

            //宣告可重覆指定的TabSpec及Intent變數
            TabHost.TabSpec spec;
            Intent          intent;

            // 建立Intent, 用來載入新的Activity到Tab控制項
            intent = new Intent(this, typeof(ArtistsActivity));

            //宣告被載入的Activity是一個新的task.
            intent.AddFlags(ActivityFlags.NewTask);

            //新增Tab, 設定Tab的圖片及內容(裝載的Activity), 然後將TabSpec加入到TabHost
            spec = TabHost.NewTabSpec("供應商管理");
            spec.SetIndicator("供應商管理", Resources.GetDrawable(Resource.Drawable.ic_tab_artists));
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            // 依照上述的做法, 將AlbumActivity及SongsActivity加入到TabHost
            intent = new Intent(this, typeof(AlbumsActivity));
            intent.AddFlags(ActivityFlags.NewTask);

            spec = TabHost.NewTabSpec("料件管理");
            spec.SetIndicator("料件管理", Resources.GetDrawable(Resource.Drawable.ic_tab_artists));
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            intent = new Intent(this, typeof(SongsActivity));
            intent.AddFlags(ActivityFlags.NewTask);

            spec = TabHost.NewTabSpec("請購管理");
            spec.SetIndicator("請購管理", Resources.GetDrawable(Resource.Drawable.ic_tab_artists));
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            intent = new Intent(this, typeof(PurchaseOrderActivity));
            intent.AddFlags(ActivityFlags.NewTask);

            spec = TabHost.NewTabSpec("採購管理");
            spec.SetIndicator("採購管理", Resources.GetDrawable(Resource.Drawable.ic_tab_artists));
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            //設定目前的Tab
            TabHost.CurrentTab = 2;
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);


            TabHost.TabSpec spec;                 // Resusable TabSpec for each tab
            Intent          intent;               // Reusable Intent for each tab

            // Create an Intent to launch an Activity for the tab (to be reused)
            intent = new Intent(this, typeof(Activity1));
            intent.AddFlags(ActivityFlags.NewTask);

            // Initialize a TabSpec for each tab and add it to the TabHost
            spec = TabHost.NewTabSpec("Op Bivak");
            spec.SetIndicator("", Resources.GetDrawable(Resource.Drawable.tab_main));
            //spec.SetIndicator ("Main", null);
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            // Do the same for the other tabs
            intent = new Intent(this, typeof(EmergencyActivity));
            intent.AddFlags(ActivityFlags.NewTask);

            spec = TabHost.NewTabSpec("Emergency");
            spec.SetIndicator("", Resources.GetDrawable(Resource.Drawable.tab_sos_red));
            //spec.SetIndicator ("Settings", null);
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            intent = new Intent(this, typeof(FaqActivity));
            intent.AddFlags(ActivityFlags.NewTask);

            spec = TabHost.NewTabSpec("FAQ");
            spec.SetIndicator("", Resources.GetDrawable(Resource.Drawable.tab_faq));
            //spec.SetIndicator ("Settings", null);
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            intent = new Intent(this, typeof(SettingsActivity));
            intent.AddFlags(ActivityFlags.NewTask);
            spec = TabHost.NewTabSpec("Settings");
            spec.SetIndicator("", Resources.GetDrawable(Resource.Drawable.tab_settings));
            //spec.SetIndicator ("Settings", null);
            spec.SetContent(intent);
            TabHost.AddTab(spec);



            TabHost.CurrentTab = 0;
        }
Exemple #10
0
        protected override void OnViewModelSet()
        {
            SetContentView(Resource.Layout.Sessions_Page_SessionHome);

            TabHost.TabSpec spec;

            for (int i = 5; i <= 7; i++)
            {
                spec = TabHost.NewTabSpec(string.Format("{0} march", i));
                spec.SetIndicator(string.Format("{0} march", i));
                spec.SetContent(CreateIntentFor(ViewModel.Days[i - 5]));
                TabHost.AddTab(spec);
            }
        }
Exemple #11
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.fragment_tabs_pager);
            tabHost = FindViewById <TabHost>(Android.Resource.Id.TabHost);
            tabHost.Setup();

            viewPager = FindViewById <ViewPager>(Resource.Id.pager);
            viewPager.OffscreenPageLimit = 5;

            tabsAdapter = new TabsAdapter(this, tabHost, viewPager);

            tabsAdapter.AddTab(tabHost.NewTabSpec("Goal").SetIndicator(string.Empty, Resources.GetDrawable(Resource.Drawable.target)), Java.Lang.Class.FromType(typeof(GoalFragment)), null);
            tabsAdapter.AddTab(tabHost.NewTabSpec("Activities").SetIndicator(string.Empty, Resources.GetDrawable(Resource.Drawable.activities)), Java.Lang.Class.FromType(typeof(ActivitiesFragment)), null);
            tabsAdapter.AddTab(tabHost.NewTabSpec("Contacts").SetIndicator(string.Empty, Resources.GetDrawable(Resource.Drawable.contacts)), Java.Lang.Class.FromType(typeof(ContactsFragment)), null);
            tabsAdapter.AddTab(tabHost.NewTabSpec("Report").SetIndicator(string.Empty, Resources.GetDrawable(Resource.Drawable.report)), Java.Lang.Class.FromType(typeof(ReportsFragment)), null);

            if (savedInstanceState != null)
            {
                tabHost.SetCurrentTabByTag(savedInstanceState.GetString(tabKeyString));
            }
        }
        private void CreateTab(Type activityType, string tag, string lavel, int drawableId, TabHost tabHost)
        {
            Intent intent = new Intent(this, activityType);

            intent.AddFlags(ActivityFlags.NewTask);

            TabHost.TabSpec specs        = tabHost.NewTabSpec(tag);
            Drawable        drawableIcon = Resources.GetDrawable(drawableId);

            specs.SetIndicator(lavel, drawableIcon);
            specs.SetContent(intent);

            tabHost.AddTab(specs);
        }
Exemple #13
0
        private void CreateTab(Type activityType, string tag, string label, TabHost tabHost)
        {
            Intent intent = new Intent(this, activityType);

            intent.AddFlags(ActivityFlags.NewTask);

            TabSpec spec = tabHost.NewTabSpec(tag);

            spec.SetIndicator(label, this.GetDrawable(Android.Resource.Drawable.IcMenuManage));

            spec.SetContent(intent);

            tabHost.AddTab(spec);
        }
Exemple #14
0
        private void InitializeTabs()
        {
            tabHost = this.mActivity.FindViewById <TabHost>(Resource.Id.tabHost);
            tabHost.Setup();

            View tabIndicator = this.mActivity.LayoutInflater.Inflate(Resource.Layout.tab_indicator, tabHost.TabWidget, false);

            (tabIndicator.FindViewById <TextView>(Android.Resource.Id.Title)).Text = "Network Devices";
            (tabIndicator.FindViewById <ImageView>(Android.Resource.Id.Icon)).SetImageResource(Resource.Mipmap.baseline_router_black_48);

            View tabIndicator2 = this.mActivity.LayoutInflater.Inflate(Resource.Layout.tab_indicator, tabHost.TabWidget, false);

            (tabIndicator2.FindViewById <TextView>(Android.Resource.Id.Title)).Text = "RTSP Servers";
            (tabIndicator2.FindViewById <ImageView>(Android.Resource.Id.Icon)).SetImageResource(Resource.Mipmap.baseline_playlist_play_black_48);

            spec1 = tabHost.NewTabSpec("Tab1");
            spec1.SetContent(Resource.Id.tab1);
            spec1.SetIndicator(tabIndicator);
            spec2 = tabHost.NewTabSpec("Tab2");
            spec2.SetIndicator(tabIndicator2);
            spec2.SetContent(Resource.Id.tab2);
            tabHost.AddTab(spec1);
            tabHost.AddTab(spec2);
        }
        private TabHost.TabSpec NewTab(String day)
        {
            TabHost.TabSpec spec;
            Intent          intent;

            // Create an Intent to launch an Activity for the tab (to be reused)
            intent = new Intent(this, typeof(TimetableDayActivity));
            intent.AddFlags(ActivityFlags.NewTask);

            // Initialize a TabSpec for each tab and add it to the TabHost
            spec = TabHost.NewTabSpec(day);
            spec.SetIndicator(" " + day + " ");
            spec.SetContent(intent);
            return(spec);
        }
Exemple #16
0
        //Cria os tabs
        private void CreateTab(Type activityType, string label)
        {
            var intent = new Intent(this, activityType);

            intent.AddFlags(ActivityFlags.NewTask);
            intent.PutExtra("member", _participante.ParticipanteToBundle());
            var spec = TabHost.NewTabSpec(label);

#pragma warning disable CS0618 // O tipo ou membro é obsoleto
            var drawableIcon = Resources.GetDrawable(Resource.Drawable.abc_tab_indicator_material);
#pragma warning restore CS0618 // O tipo ou membro é obsoleto
            spec.SetIndicator(label, drawableIcon);
            spec.SetContent(intent);
            TabHost.AddTab(spec);
        }
        protected override void OnViewModelSet()
        {
            SetContentView(Resource.Layout.Home_Page_HomeView);

            TabHost.TabSpec spec;

            spec = TabHost.NewTabSpec("Bio");
            spec.SetIndicator("Bio");
            spec.SetContent(CreateIntentFor(ViewModel.Speaker));
            TabHost.AddTab(spec);

            spec = TabHost.NewTabSpec("Sessions");
            spec.SetIndicator("Sessions");
            spec.SetContent(CreateIntentFor(ViewModel.Sessions));
            TabHost.AddTab(spec);
        }
Exemple #18
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            TabHost.AddTab(TabHost.NewTabSpec("tab1").SetIndicator("list")
                           .SetContent(new Intent(this, typeof(List1))));

            TabHost.AddTab(TabHost.NewTabSpec("tab2").SetIndicator("photo list")
                           .SetContent(new Intent(this, typeof(List8))));

            // This tab sets the intent flag so that it is recreated each time
            // the tab is clicked.
            TabHost.AddTab(TabHost.NewTabSpec("tab3").SetIndicator("destroy")
                           .SetContent(new Intent(this, typeof(Controls1))
                                       .AddFlags(ActivityFlags.ClearTop)));
        }
        private void CreateTab(Type activityType, string tag, int labelId)
        {
            // Load the string resource for the label
            var label = Resources.GetString(labelId);

            var intent = new Intent(this, activityType);

            intent.AddFlags(ActivityFlags.NewTask);

            var spec = TabHost.NewTabSpec(tag);

            spec.SetIndicator(label);
            spec.SetContent(intent);

            TabHost.AddTab(spec);
        }
Exemple #20
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            Logging.Log(this, Logging.LoggingTypeDebug, "OnCreate");

            SetContentView(Resource.Layout.Tabs);

            // Datenbank initialisieren
            new DBSchema().UpdateDBSchema();

            TabHost.TabSpec spec;
            Intent          intent;

            // --

            /*
             * intent = new Intent(this, typeof(Dates));
             * intent.AddFlags(ActivityFlags.NewTask);
             *
             * spec = TabHost.NewTabSpec("TabDates");
             * spec.SetIndicator("Termine");
             * spec.SetContent(intent);
             *
             * TabHost.AddTab(spec);
             */
            // --

            intent = new Intent(this, typeof(News));
            intent.AddFlags(ActivityFlags.NewTask);

            spec = TabHost.NewTabSpec("TabNews");
            spec.SetIndicator("Neuigkeiten");
            spec.SetContent(intent);

            TabHost.AddTab(spec);

            // --

            // Wenn die App noch nicht konfiguriert wurde, die Einstellungen anzeigen.
            if (!new Config(this).GetAppConfig().AppIsConfigured)
            {
                Intent setIntent = new Android.Content.Intent(this, typeof(Settings));
                setIntent.PutExtra("FirstRun", true);
                StartActivityForResult(setIntent, 0);
            }
        }
Exemple #21
0
        private void CreateTab(Type activityType, string tag, string label, int drawableId, bool selected = false)
        {
            var intent = new Intent(this, activityType);

            intent.AddFlags(ActivityFlags.NewTask);

            var spec = TabHost.NewTabSpec(tag);

            //spec.SetIndicator(createTabView(this.ApplicationContext, drawableId));
            var tv = createTabView(this.ApplicationContext, label, drawableId, selected);

            tabViews.Add(tag, tv);
            spec.SetIndicator(tv);
            spec.SetContent(intent);

            TabHost.AddTab(spec);
        }
Exemple #22
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            TabHost.TabSpec spec;   // Resusable TabSpec for each tab
            Intent          intent; // Reusable Intent for each tab

            // Create an Intent to launch an Activity for the tab (to be reused)
            intent = new Intent(this, typeof(MultiChart));
            intent.AddFlags(ActivityFlags.NewTask);

            spec = TabHost.NewTabSpec("Combined chart");
            spec.SetIndicator("Multi-chart");
            // Initialize a TabSpec for each tab and add it to the TabHost
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            // Do the same for the other tabs
            intent = new Intent(this, typeof(Classic));
            intent.AddFlags(ActivityFlags.NewTask);

            spec = TabHost.NewTabSpec("Classic zoom chart");
            spec.SetIndicator("Area series");
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            intent = new Intent(this, typeof(Pie2D));
            intent.AddFlags(ActivityFlags.NewTask);

            spec = TabHost.NewTabSpec("2D Pie chart");
            spec.SetIndicator("2D Pie");
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            intent = new Intent(this, typeof(BatteryGauge));
            intent.AddFlags(ActivityFlags.NewTask);

            spec = TabHost.NewTabSpec("Battery level");
            spec.SetIndicator("Battery");
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            TabHost.CurrentTab = 0;
        }
Exemple #23
0
        protected override void OnViewModelSet()
        {
            SetContentView(Resource.Layout.MainPageView);

            TabHost.TabSpec spec;
            Intent          intent;

            //Set tabs in MainPageView
            spec = TabHost.NewTabSpec("MainPageEntryViewModel");
            spec.SetIndicator(Resources.GetString(Resource.String.entry));
            spec.SetContent(this.CreateIntentFor(MainPageViewModel.MainPageEntryViewModel));
            TabHost.AddTab(spec);

            spec = TabHost.NewTabSpec("MainPageFavoritesViewModel");
            spec.SetIndicator(Resources.GetString(Resource.String.favorites));
            spec.SetContent(this.CreateIntentFor(MainPageViewModel.MainPageFavoritesViewModel));
            TabHost.AddTab(spec);
        }
        protected override void OnCreate(Bundle bundle)
        {
            RequestWindowFeature(WindowFeatures.NoTitle);
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.FirstView);
            TabHost.TabSpec tabspec;
            //Intent intent;

            tabspec = TabHost.NewTabSpec("requests");
            tabspec.SetIndicator("Requests");
            tabspec.SetContent(this.CreateIntentFor(FirstViewModel.Requests));
            TabHost.AddTab(tabspec);

            tabspec = TabHost.NewTabSpec("find");
            tabspec.SetIndicator("Find");
            tabspec.SetContent(this.CreateIntentFor(FirstViewModel.Find));
            TabHost.AddTab(tabspec);
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Start);

            var intent = new Intent(this, typeof(MyLocations));

            intent.AddFlags(ActivityFlags.ClearTop);
            var spec = TabHost.NewTabSpec("WhatsOn");
            var draw = Resources.GetDrawable(Resource.Drawable.ic_tab_whats_on);

            spec.SetIndicator("", draw);
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            intent = new Intent(this, typeof(MyHangouts));
            intent.AddFlags(ActivityFlags.ClearTop);
            spec = TabHost.NewTabSpec("Cart");
            draw = Resources.GetDrawable(Resource.Drawable.ic_tab_speakers);
            spec.SetIndicator("", draw);
            spec.SetContent(intent);

            TabHost.AddTab(spec);

            intent = new Intent(this, typeof(Wineoutletweb));
            intent.AddFlags(ActivityFlags.ClearTop);
            spec = TabHost.NewTabSpec("Login");
            draw = Resources.GetDrawable(Resource.Drawable.ic_tab_sessions);
            spec.SetIndicator("", draw);
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            //intent = new Intent(this, typeof(MyScheduleActivity));
            //intent.AddFlags(ActivityFlags.ClearTop);
            //spec = TabHost.NewTabSpec("Contect");
            //draw = Resources.GetDrawable(Resource.Drawable.ic_tab_my_schedule);

            //spec.SetIndicator("", draw);
            //spec.SetContent(intent);
            //TabHost.AddTab(spec);
        }
Exemple #26
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.OmnicTabsView);

            TabHost.TabSpec spec = TabHost.NewTabSpec("child1");
            spec.SetIndicator("1");
            spec.SetContent(this.CreateIntentFor(FirstViewModel.Child1));
            TabHost.AddTab(spec);

            spec = TabHost.NewTabSpec("child2");
            spec.SetIndicator("2");
            spec.SetContent(this.CreateIntentFor(FirstViewModel.Child2));
            TabHost.AddTab(spec);

            spec = TabHost.NewTabSpec("child3");
            spec.SetIndicator("3");
            spec.SetContent(this.CreateIntentFor(FirstViewModel.Child3));
            TabHost.AddTab(spec);
        }
    void CreateTabs()
    {
        TabHost.TabSpec spec;
        spec = TabHost.NewTabSpec(ViewModel.TextSource.GetText(LocalizationConstants.Planning_Stats));
        spec.SetIndicator(ViewModel.TextSource.GetText(LocalizationConstants.Planning_Stats));
        var intent = new Intent(this.CreateIntentFor(ViewModel.PlanningStats));

        spec.SetContent(intent.AddFlags(ActivityFlags.ClearTop));
        TabHost.AddTab(spec);
        var currentGameweek = ViewModel.CurrentGW;

        foreach (var planningGW in ViewModel.PlanningGW)
        {
            spec = TabHost.NewTabSpec(string.Format("{0}{1}", ViewModel.SharedTextSource.GetText(LocalizationConstants.Shared_GW), planningGW.Gameweek));
            spec.SetIndicator(string.Format("{0}{1}", ViewModel.SharedTextSource.GetText(LocalizationConstants.Shared_GW), planningGW.Gameweek));
            intent = new Intent(this.CreateIntentFor(planningGW));
            spec.SetContent(intent.AddFlags(ActivityFlags.ClearTop));
            TabHost.AddTab(spec);
        }
    }
        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);
        }
        private void CreateTabs()
        {
            CreateTab(typeof(PlacesActivity), "places", Resource.Drawable.HomeTabPlaces);
            CreateTab(typeof(CategoriesActivity), "categories", Resource.Drawable.HomeTabCategories);
            CreateTab(typeof(ProfileActivity), "profile", Resource.Drawable.HomeTabProfile);
            CreateTab(typeof(SettingsActivity), "settings", Resource.Drawable.HomeTabSettings);

            void CreateTab(Type activityType, string tag, int drawableId)
            {
                var intent = new Intent(this, activityType);

                intent.AddFlags(ActivityFlags.NewTask);

                var spec = TabHost.NewTabSpec(tag);

                spec.SetContent(intent);
                spec.SetIndicator((string)null, GetDrawable(drawableId));

                TabHost.AddTab(spec);
            }
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.FirstView);

            TabHost.TabSpec spec;

            spec = TabHost.NewTabSpec("hiraganaChild");
            spec.SetIndicator("Hiragana");
            spec.SetContent(this.CreateIntentFor(FirstViewModel.HiraganaChild));
            TabHost.AddTab(spec);

            spec = TabHost.NewTabSpec("katakanaChild");
            spec.SetIndicator("Katakana");
            spec.SetContent(this.CreateIntentFor(FirstViewModel.KatakanaChild));
            TabHost.AddTab(spec);

            spec = TabHost.NewTabSpec("kanjiChild");
            spec.SetIndicator("Kanji");
            spec.SetContent(this.CreateIntentFor(FirstViewModel.KanjiChild));
            TabHost.AddTab(spec);
        }