Beispiel #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.Index);

            TabHost tab = FindViewById <TabHost>(Resource.Id.tabHost1);

            tab.Setup();

            TabHost.TabSpec spec1 = tab.NewTabSpec("主页");
            spec1.SetContent(Resource.Id.layoutIndex);
            spec1.SetIndicator("主页");

            TabHost.TabSpec spec2 = tab.NewTabSpec("书篮");
            spec2.SetContent(Resource.Id.layoutBookbasket);
            spec2.SetIndicator("书篮");

            TabHost.TabSpec spec3 = tab.NewTabSpec("个人中心");
            spec3.SetContent(Resource.Id.layoutPrivate);
            spec3.SetIndicator("个人中心");

            tab.AddTab(spec1);
            tab.AddTab(spec2);
            tab.AddTab(spec3);

            TabBookBasket();
            TabIndex();
            TabPrivate();
        }
Beispiel #2
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
            intent = new Intent(this, typeof(LunchDayActivity));
            intent.AddFlags(ActivityFlags.NewTask);

            // Initialize a TabSpec for each tab and add it to the TabHost
            spec = TabHost.NewTabSpec("lunchtable");
            spec.SetIndicator(Resources.GetString(Resource.String.lunchtable), Resources.GetDrawable(Resource.Drawable.menu));
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            intent = new Intent(this, typeof(TimetableActivity));
            intent.AddFlags(ActivityFlags.NewTask);
            spec = TabHost.NewTabSpec("timetables");
            spec.SetIndicator(Resources.GetString(Resource.String.timetable), Resources.GetDrawable(Resource.Drawable.timetable));
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            intent = new Intent(this, typeof(ShowSettings));
            intent.AddFlags(ActivityFlags.NewTask);
            spec = TabHost.NewTabSpec("settings");
            spec.SetIndicator(Resources.GetString(Resource.String.settings), Resources.GetDrawable(Resource.Drawable.settings));
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            TabHost.CurrentTab = 0;
        }
Beispiel #3
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.Inflate(Resource.Layout.CustomerDetails, container, false);

            viewCust = view;

            InitActionBar();

            view.FindViewById <FrameLayout>(Resource.Id.realtabcontent).Visibility = ViewStates.Gone;

            customer = CustomerInfo.GetCustomer(Activity, this.ObjectId);

            tbCustCode = (TextView)view.FindViewById(Resource.Id.tbCustomerCode);
            tbCustName = (TextView)view.FindViewById(Resource.Id.tbCustomerName);

            tbCustCode.Text = customer.Code;
            tbCustName.Text = customer.Name;

            statisticTabMonthly = StatisticTabMonthly.NewInstance(this.ObjectId);
            statisticTabByDate  = StatisticTabByDate.NewInstance(this.ObjectId, customerNames);

            mTabHost             = (TabHost)view.FindViewById(Resource.Id.tabhost);
            mTabHost.TabChanged += TabHostHandleTabChanged;
            mTabHost.Setup();
            InitializeTab(view);

            GC.Collect();
            return(view);
        }
Beispiel #4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            TabHost tabHost = (TabHost)FindViewById(Resource.Id.tabHost);

            tabHost.Setup();

            TabHost.TabSpec tabSpec = tabHost.NewTabSpec("xp1");
            tabSpec.SetContent(Resource.Id.linear_layout_ports_config_xp1);
            tabSpec.SetIndicator("XP1");
            tabHost.AddTab(tabSpec);

            tabSpec = tabHost.NewTabSpec("xp2");
            tabSpec.SetContent(Resource.Id.linear_layout_ports_config_xp2);
            tabSpec.SetIndicator("XP2");
            tabHost.AddTab(tabSpec);

            tabSpec = tabHost.NewTabSpec("xt2");
            tabSpec.SetContent(Resource.Id.linear_layout_ports_config_xt2);
            tabSpec.SetIndicator("XT2");
            tabHost.AddTab(tabSpec);

            tabSpec = tabHost.NewTabSpec("xp56");
            tabSpec.SetContent(Resource.Id.linear_layout_ports_config_xp56);
            tabSpec.SetIndicator("XP5/6");
            tabHost.AddTab(tabSpec);

            tabHost.CurrentTab = 0;
        }
Beispiel #5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(R.Layouts.fragment_tabs_pager);
            mTabHost = (TabHost)FindViewById(global::Android.R.Id.Tabhost);
            mTabHost.Setup();

            mViewPager = (ViewPager)FindViewById(R.Ids.pager);

            mTabsAdapter = new TabsAdapter(this, mTabHost, mViewPager);

            mTabsAdapter.AddTab(mTabHost.NewTabSpec("simple").SetIndicator("Simple"),
                                typeof(FragmentStackSupport.CountingFragment), null);
            mTabsAdapter.AddTab(mTabHost.NewTabSpec("contacts").SetIndicator("Contacts"),
                                typeof(LoaderCursorSupport.CursorLoaderListFragment), null);
            mTabsAdapter.AddTab(mTabHost.NewTabSpec("custom").SetIndicator("Custom"),
                                typeof(LoaderCustomSupport.AppListFragment), null);
            mTabsAdapter.AddTab(mTabHost.NewTabSpec("throttle").SetIndicator("Throttle"),
                                typeof(LoaderThrottleSupport.ThrottledLoaderListFragment), null);

            if (savedInstanceState != null)
            {
                mTabHost.SetCurrentTabByTag(savedInstanceState.GetString("tab"));
            }
        }
Beispiel #6
0
        /// <summary>
        /// Called on activity creation.
        /// </summary>
        /// <param name="bundle">Bundle.</param>
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            RequestWindowFeature(WindowFeatures.NoTitle);
            SetContentView(Resource.Layout.History);
            Window.SetFlags(WindowManagerFlags.Fullscreen, WindowManagerFlags.Fullscreen);

            DisplayMetrics metrics   = Resources.DisplayMetrics;
            int            widthInDp = metrics.WidthPixels;

            tabH = FindViewById <TabHost> (Android.Resource.Id.TabHost);
            tabH.LayoutParameters.Width = (int)(widthInDp * TAB_WIDTH);

            tabW = FindViewById <TabWidget> (Android.Resource.Id.Tabs);

            back        = FindViewById <Button> (Resource.Id.backHistory);
            back.Click += Back;

            delete        = FindViewById <Button> (Resource.Id.Delete);
            delete.Click += Delete;

            CreateTab(typeof(LastGame), "last_game", "Last Game");
            CreateTab(typeof(AllGames), "all_games", "All Games");
            CreateTab(typeof(Points), "points", "Points");
        }
Beispiel #7
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);
        }
Beispiel #8
0
        protected override void OnViewModelSet()
        {
            SetContentView(Resource.Layout.Page_SpheroView);

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

            // Initialize a TabSpec for each tab and add it to the TabHost
            spec = TabHost.NewTabSpec("move");
            spec.SetIndicator("Move", Resources.GetDrawable(Resource.Drawable.Tab_Move));
            spec.SetContent(CreateIntentFor(ViewModel.Movement));
            TabHost.AddTab(spec);

            spec = TabHost.NewTabSpec("turn");
            spec.SetIndicator("Turn", Resources.GetDrawable(Resource.Drawable.Tab_Turn));
            spec.SetContent(CreateIntentFor(ViewModel.Heading));
            TabHost.AddTab(spec);

            spec = TabHost.NewTabSpec("color");
            spec.SetIndicator("Color", Resources.GetDrawable(Resource.Drawable.Tab_Color));
            spec.SetContent(CreateIntentFor(ViewModel.Color));
            TabHost.AddTab(spec);

            spec = TabHost.NewTabSpec("accel");
            spec.SetIndicator("Tilt", Resources.GetDrawable(Resource.Drawable.Tab_MoveAccel));
            spec.SetContent(CreateIntentFor(ViewModel.AccelMovement));
            TabHost.AddTab(spec);

            TabHost.TabChanged += (sender, args) =>
            {
                var isAccelTab = (args.TabId == "accel");
                ViewModel.AccelMovement.EnsureAccelerometerIsOnCommand.Execute(isAccelTab);
            };
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.LiveScoreTab);
            Console.WriteLine("LiveScoreTabActivity");



            CreateTab(typeof(TodayLiveScoreActivity), "today", "Today", Resource.Drawable.livescore_state);
            TabHost.SetCurrentTabByTag("today");
            TabChangerListener.setTabColor(TabHost);
            TabHost.TabWidget.GetChildAt(0).Click += (object sender, EventArgs e) => {
                isSelected(0);
                setColor(TabHost);
                TabHost.SetCurrentTabByTag("yesterday");
            };

            TabHost.TabWidget.GetChildAt(1).Click += (object sender, EventArgs e) => {
                isSelected(1);
                setColor(TabHost);
                TabHost.SetCurrentTabByTag("today");
            };

            // Create your application here
        }
Beispiel #10
0
 private void InitializeTabs(Bundle savedInstanceState)
 {
     mlam    = new LocalActivityManager(this, true);
     tabHost = FindViewById <TabHost> (Resource.Id.tabHost);
     mlam.DispatchCreate(savedInstanceState);
     tabHost.Setup(mlam);
 }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.TimeTable);

            TimeColumns = new List <TextView>(16);

            foreach (string day in new string[] { "Today", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" })
            {
                TabHost.AddTab(NewTab(day));
            }

            //magical tab jumping to actually create the content in the tabs #lolandroid
            TabHost.CurrentTab = 0;
            TabHost.CurrentTab = 1;
            TabHost.CurrentTab = 2;
            TabHost.CurrentTab = 3;
            TabHost.CurrentTab = 4;
            TabHost.CurrentTab = 5;
            TabHost.CurrentTab = 6;
            TabHost.CurrentTab = 7;
            TabHost.CurrentTab = 8;
            TabHost.CurrentTab = 0;

            loadingBar = FindViewById <ProgressBar>(Resource.Id.progressBar1);
            loadingBar.Indeterminate = true;

            TodayDepartStringEventFirer = DataGetter.StringEventHandler;
            if (DataGetter.StringEventHandler != null)
            {
                DataGetter.StringEventHandler.Changed += new StringEventFirer.ChangedEventHandler(TimetableStringChanged);
            }
        }
Beispiel #12
0
        async void LoginBotao_Clicked(object sender, EventArgs e)
        {
            LoginButton.IsEnabled = false;
            //TesteConexao();

            ValidaEntradas();

            string email = EmailEntry.Text;
            string senha = SenhaEntry.Text;

            App.UsuarioVM.Usuario = await App.UsuarioVM.Login(email, senha);

            LoginButton.IsEnabled = true;

            if (App.UsuarioVM.Usuario.ID > 0)
            {
                var mainPage = new TabHost();
                await Navigation.PushModalAsync(mainPage);
            }
            else
            {
                await DisplayAlert("ops", "não tem esse email", "volta lá");

                EmailEntry.Focus();
            }
        }
Beispiel #13
0
 public TabManager(FragmentActivity activity, TabHost tabHost, int containerId)
 {
     _activity    = activity;
     _tabHost     = tabHost;
     _containerId = containerId;
     _tabHost.SetOnTabChangedListener(this);
 }
Beispiel #14
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

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

            tabManager = new TabManager(this, tabHost, Resource.Id.realtabcontent);

            tabManager.AddTab(tabHost.NewTabSpec("simple").SetIndicator("Simple"), Java.Lang.Class.FromType(typeof(FragmentStackSupport.CountingFragment)), null);
            tabManager.AddTab(tabHost.NewTabSpec("contacts").SetIndicator("Custom"), Java.Lang.Class.FromType(typeof(LoaderCursorSupport.CursorLoaderListFragment)), null);

            /*tabManager.AddTab(tabHost.NewTabSpec("contacts").SetIndicator("Contacts"),
             * LoaderCursorSupport.CursorLoaderListFragment.class, null);
             * tabManager.AddTab(tabHost.NewTabSpec("custom").SetIndicator("Custom"),
             * LoaderCustomSupport.AppListFragment.class, null);
             * tabManager.AddTab(mttabHost.NewTabSpec("throttle").SetIndicator("Throttle"),
             * LoaderThrottleSupport.ThrottledLoaderListFragment.class, null);
             */


            if (savedInstanceState != null)
            {
                tabHost.SetCurrentTabByTag(savedInstanceState.GetString("tab"));
            }
        }
        /// <summary>
        /// Activitie's create event handeler.
        /// </summary>
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Create managers and register references
            MgrAccessor.RegisterReference <IFileEntryManager>(new FileEntryManager());
            MgrAccessor.RegisterReference <ICommonUtils>(new CommonUtils());
            MgrAccessor.RegisterReference <IDiskUtils>(new DiskUtils());
#if DEBUG
            // Create test data
            MgrAccessor.DiskUtils.CreateTestData();
#endif

            SetContentView(Resource.Layout.Home);

            // Create FileEntryList tab
            var intent = new Intent(this, typeof(FileEntryListActivity));
            intent.AddFlags(ActivityFlags.NewTask);
            var spec = TabHost.NewTabSpec("Explorer");
            spec.SetIndicator("", Resources.GetDrawable(Resource.Drawable.ic_tab_explorer));
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            // Create About tab
            intent = new Intent(this, typeof(AboutActivity));
            intent.AddFlags(ActivityFlags.NewTask);
            spec = TabHost.NewTabSpec("About");
            spec.SetIndicator("", Resources.GetDrawable(Resource.Drawable.ic_tab_about));
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            TabHost.CurrentTab = 0;
        }
Beispiel #16
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.FirstView);

            // Make sure the device support for google play services
            GcmClient.CheckDevice(this);
            GcmClient.CheckManifest(this);

            // Register the app for push notifications.
            GcmClient.Register(this, Receiver.senderIDs);

            TabHost.TabSpec spec;

            spec = TabHost.NewTabSpec("search");
            spec.SetIndicator("", Resources.GetDrawable(Resource.Drawable.indicator_search));
            spec.SetContent(this.CreateIntentFor(FirstViewModel.Search));
            TabHost.AddTab(spec);

            spec = TabHost.NewTabSpec("recent");
            spec.SetIndicator("", Resources.GetDrawable(Resource.Drawable.indicator_history));
            spec.SetContent(this.CreateIntentFor(FirstViewModel.Recent));
            TabHost.AddTab(spec);

            spec = TabHost.NewTabSpec("favourite");

            spec.SetIndicator("", Resources.GetDrawable(Resource.Drawable.indicator_favorite));
            spec.SetContent(this.CreateIntentFor(FirstViewModel.Favourite));
            TabHost.AddTab(spec);
        }
Beispiel #17
0
 public void InitView()
 {
     host             = FindViewById <TabHost>(Resource.Id.tabHost1);
     joblist          = FindViewById <ListView>(Resource.Id.Joblist);
     picker           = FindViewById <Spinner>(Resource.Id.JobPicker);
     JobsLabel        = FindViewById <TextView>(Resource.Id.JobsLabel);
     DescriptionLabel = FindViewById <TextView>(Resource.Id.DescriptionLabel);
     FromLabel        = FindViewById <TextView>(Resource.Id.FromLabel);
     ToLabel          = FindViewById <TextView>(Resource.Id.ToLabel);
     LocationLabel    = FindViewById <TextView>(Resource.Id.LocationLabel);
     DateFromLabel    = FindViewById <TextView>(Resource.Id.DateFromLabel);
     DateToLabel      = FindViewById <TextView>(Resource.Id.DateToLabel);
     PriceLabel       = FindViewById <TextView>(Resource.Id.PriceLabel);
     Description      = FindViewById <EditText>(Resource.Id.Description);
     From             = FindViewById <AutoCompleteTextView>(Resource.Id.From);
     To        = FindViewById <AutoCompleteTextView>(Resource.Id.To);
     Location  = FindViewById <AutoCompleteTextView>(Resource.Id.Location);
     Price     = FindViewById <EditText>(Resource.Id.Price);
     DateFrom  = FindViewById <DatePicker>(Resource.Id.DateFrom);
     DateTo    = FindViewById <DatePicker>(Resource.Id.DateTo);
     Submit    = FindViewById <Button>(Resource.Id.Submit);
     DateLabel = FindViewById <TextView>(Resource.Id.DateLabel);
     Date      = FindViewById <DatePicker>(Resource.Id.Date);
     Logout    = FindViewById <Button>(Resource.Id.Logout);
 }
Beispiel #18
0
            protected override void OnCreate(Bundle bundle)
            {
                base.OnCreate(bundle);

                // Set our view from the "main" layout resource
                SetContentView(Resource.Layout.Main);                 //Main

                TabHost tabHost = FindViewById <TabHost> (Resource.Id.tabHost);

                tabHost.Setup(this.LocalActivityManager);


                TabHost.TabSpec tabSpec1 = tabHost.NewTabSpec("Contacts");
                TabHost.TabSpec tabSpec2 = tabHost.NewTabSpec("Settings");

                Intent intent;

                tabSpec1.SetIndicator("Contacts");
                intent = new Intent(this, typeof(ContactsActivity));
                intent.AddFlags(ActivityFlags.NewTask);
                tabSpec1.SetContent(intent);

                tabSpec2.SetIndicator("Settings");
                intent = new Intent(this, typeof(SettingsActivity));
                intent.AddFlags(ActivityFlags.NewTask);
                tabSpec2.SetContent(intent);

                tabHost.AddTab(tabSpec1);
                tabHost.AddTab(tabSpec2);

                tabHost.CurrentTab = 0;

                intent = new Intent(this, typeof(LoginActivity));
                StartActivity(intent);
            }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            TabHost.TabSpec spec;
            Intent          intent;

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

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

            spec = TabHost.NewTabSpec("tab1");
            spec.SetIndicator("Tab 1", Resources.GetDrawable(Resource.Drawable.ic_tab));
            spec.SetContent(intent);
            TabHost.AddTab(spec);

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

            spec = TabHost.NewTabSpec("tab2");
            spec.SetIndicator("Tab 2", Resources.GetDrawable(Resource.Drawable.ic_tab));
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            TabHost.CurrentTab = 0;
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View v = inflater.Inflate(Resource.Layout.InvoiceScreen, container, false);

            view = v;

            InitActionBar();

            invoiceTabHeader  = InvoiceTabHeader.NewInstance(this);
            invoiceTabDetails = InvoiceTabDetails.NewInstance(this);
            invoiceTabDetails.DetailsChanged += invoiceTabDetails_DetailsChanged;
            invoiceTabHeader.CustomerChanged += invoiceTabHeader_CustomerChanged;

            tabHost = (TabHost)view.FindViewById(Resource.Id.tabhost);
            tabHost.Setup();
            InitializeTab();

            /*if (isTablet)
             * {
             *  if (Common.isPortrait(this.Activity))
             *  {
             *      InitPopupMenu();
             *  }
             * }       */

            GC.Collect();
            return(v);
        }
        public override Android.Views.View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle p2)
        {
            mRootView = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_session_detail, null);
            mTabHost  = mRootView.FindViewById <TabHost> (Android.Resource.Id.TabHost);
            mTabHost.Setup();

            mTitle    = mRootView.FindViewById <TextView> (Resource.Id.session_title);
            mSubtitle = mRootView.FindViewById <TextView> (Resource.Id.session_subtitle);
            mStarred  = mRootView.FindViewById <CompoundButton> (Resource.Id.star_button);


            mStarred.CheckedChange += HandleCheckedChange;
            mStarred.Focusable      = true;
            mStarred.Clickable      = true;

            // Larger target triggers star toggle
            View starParent = mRootView.FindViewById <View> (Resource.Id.header_session);

            FractionalTouchDelegate.SetupDelegate(starParent, mStarred, new RectF(0.6f, 0f, 1f, 0.8f));

            mAbstract     = mRootView.FindViewById <TextView> (Resource.Id.session_abstract);
            mRequirements = mRootView.FindViewById <TextView> (Resource.Id.session_requirements);

            SetupSummaryTab();
            SetupNotesTab();
            SetupLinksTab();

            return(mRootView);
        }
Beispiel #22
0
 protected App()
 {
     Instance        = this;
     TabHost         = new TabHost();
     MainPage        = TabHost;
     _enabledModules = new List <BaseModule>();
 }
    protected override void OnCreate(Bundle savedInstanceState)
    {
        base.OnCreate(savedInstanceState);
        //set the content view
        SetContentView(Resource.Layout.subs);
        //declare webview and tell our code where to find the XAML resource
        WebView subWebView = FindViewById <WebView>(Resource.Id.webViewSubs);

        //set the webview client
        subWebView.SetWebViewClient(new WebViewClient());
        //load the subscription url
        subWebView.LoadUrl("https://www.bitchute.com/subscriptions/");
        //enable javascript in our webview
        subWebView.Settings.JavaScriptEnabled = true;
        //zoom control on?  This should perhaps be disabled for consistency?
        //we will leave it on for now
        subWebView.Settings.BuiltInZoomControls = true;
        subWebView.Settings.SetSupportZoom(true);
        //scrollbarsdisabled
        // subWebView.ScrollBarStyle = ScrollbarStyles.OutsideOverlay;
        subWebView.ScrollbarFadingEnabled = false;
        //declare our tabhost tab and tell the class where to find resource
        TabHost tab = Parent.FindViewById <TabHost>(Android.Resource.Id.TabHost);

        //GetChildAt(1) means tab two.  So our click listener is listening on tab 2.
        ((TabActivity)Parent).TabHost.TabWidget.GetChildAt(1).SetOnClickListener(new MyOnClickListener(tab));
    }
        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);
        }
        protected override void OnViewModelSet()
        {
            SetContentView(Resource.Layout.Page_Home);

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

            // Initialize a TabSpec for each tab and add it to the TabHost
            spec = TabHost.NewTabSpec("welcome");
            spec.SetIndicator(this.GetText("Welcome"), Resources.GetDrawable(Resource.Drawable.Tab_Welcome));
            spec.SetContent(CreateIntentFor(ViewModel.Welcome));
            TabHost.AddTab(spec);

            spec = TabHost.NewTabSpec("sessions");
            spec.SetIndicator(this.GetText("Sessions"), Resources.GetDrawable(Resource.Drawable.Tab_Sessions));
            spec.SetContent(CreateIntentFor(ViewModel.Sessions));
            TabHost.AddTab(spec);

            spec = TabHost.NewTabSpec("favorites");
            spec.SetIndicator(this.GetText("Favorites"), Resources.GetDrawable(Resource.Drawable.Tab_Favorites));
            spec.SetContent(CreateIntentFor(ViewModel.Favorites));
            TabHost.AddTab(spec);

            spec = TabHost.NewTabSpec("tweets");
            spec.SetIndicator(this.GetText("Tweets"), Resources.GetDrawable(Resource.Drawable.Tab_Tweets));
            spec.SetContent(CreateIntentFor(ViewModel.Twitter));
            TabHost.AddTab(spec);

            //TabHost.TabChanged += (s, e) => UpdateTabColors();
            //UpdateTabColors();
        }
Beispiel #26
0
        protected override void OnViewModelSet()
        {
            SetContentView(Resource.Layout.Home_Page_HomeView);

            TabHost.TabSpec spec;

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

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

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

            //spec = TabHost.NewTabSpec("Upcoming Sessions");
            //spec.SetIndicator("Upcoming Sessions");
            //spec.SetContent(CreateIntentFor(ViewModel.UpcomingSessions));
            //TabHost.AddTab(spec);
        }
Beispiel #27
0
        private void IsMain(bool isInit = true, bool isReq = false)
        {
            SetContentView(Resource.Layout.Main);
            baseModel.Content = CurrentContent.Main;
            TabHost tabHost = (TabHost)FindViewById(Resource.Id.tabHost);

            tabHost.Setup();

            Android.Widget.TabHost.TabSpec spec1 = tabHost.NewTabSpec("Tab 1");
            spec1.SetIndicator("Todo");
            spec1.SetContent(Resource.Id.tab1);

            Android.Widget.TabHost.TabSpec spec2 = tabHost.NewTabSpec("Tab 2");
            spec2.SetIndicator("Waiting");
            spec2.SetContent(Resource.Id.tab2);

            Android.Widget.TabHost.TabSpec spec3 = tabHost.NewTabSpec("Tab 3");
            spec3.SetIndicator("Done");
            spec3.SetContent(Resource.Id.tab3);

            add        = (Button)FindViewById(Resource.Id.Add);
            add.Click += Main_Button_Click;

            tab1Content = (ScrollView)FindViewById(Resource.Id.tab1Content);
            tab2Content = (ScrollView)FindViewById(Resource.Id.tab2Content);
            tab3Content = (ScrollView)FindViewById(Resource.Id.tab3Content);
            tabHost.AddTab(spec1);
            tabHost.AddTab(spec2);
            tabHost.AddTab(spec3);
            AddToContent(isInit, isReq);
        }
Beispiel #28
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            // Create an Intent to launch an Activity for the tab (to be reused)
            //var intent = new Intent(this, typeof(MyActivityGroup));
            var intent = new Intent(this, typeof(MonthActivity));

            intent.AddFlags(ActivityFlags.ClearTop);
            var spec = TabHost.NewTabSpec("Maand");

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

            intent = new Intent(this, typeof(DagActivity));

            intent.AddFlags(ActivityFlags.ClearTop);
            spec = TabHost.NewTabSpec("Dag");
            spec.SetIndicator("Dag", null);
            spec.SetContent(intent);
            TabHost.AddTab(spec);
            TabHost.CurrentTab = 0;
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.AssignmentsTabsLayout);

            tabHost = FindViewById <TabHost> (Resource.Id.assingmentTabHost);
            //In order to use tabs outside of a TabActivity I have to use this local activity manager and dispatch create the savedInstanceState
            localManger = new LocalActivityManager(this, true);
            localManger.DispatchCreate(savedInstanceState);
            tabHost.Setup(localManger);

            TabHost.TabSpec assignmentsSpec  = tabHost.NewTabSpec("list");
            Intent          assignmentIntent = new Intent(this, typeof(AssignmentsActivity));

            assignmentsSpec.SetContent(assignmentIntent);
            assignmentsSpec.SetIndicator("list");

            TabHost.TabSpec mapViewSpec   = tabHost.NewTabSpec("map");
            Intent          mapViewIntent = new Intent(this, typeof(MapViewActivity));

            mapViewSpec.SetContent(mapViewIntent);
            mapViewSpec.SetIndicator("map");

            tabHost.AddTab(assignmentsSpec);
            tabHost.AddTab(mapViewSpec);

            tabHost.TabChanged += (sender, e) => {
                if (tabHost.CurrentTab == 0)
                {
                    MapData = null;
                }
            };

            try {
                if (savedInstanceState != null)
                {
                    if (savedInstanceState.ContainsKey(Constants.CurrentTab))
                    {
                        var currentTab = savedInstanceState.GetInt(Constants.CurrentTab, 0);
                        tabHost.CurrentTab = currentTab;
                    }
                    else
                    {
                        tabHost.CurrentTab = 0;
                    }

                    MapData = savedInstanceState.ContainsKey("mapData") ?
                              (MapDataWrapper)savedInstanceState.GetSerializable("mapData") : null;
                }
                else
                {
                    MapData            = null;
                    tabHost.CurrentTab = 0;
                }
            } catch (Exception) {
                tabHost.CurrentTab = 0;
            }
        }
        private void InitializeUI()
        {
            if (DeviceDisplay.MainDisplayInfo.Orientation == DisplayOrientation.Portrait)
            {
                SetContentView(Resource.Layout.DownloadActivityPortrait);

                _countryAdapter                       = new DownloadCountryAdapter(this, false);
                _downloadCountrySpinner               = FindViewById <Spinner>(Resource.Id.DownloadCountrySpinner);
                _downloadCountrySpinner.Adapter       = _countryAdapter;
                _downloadCountrySpinner.ItemSelected += OnCountrySpinnerItemSelected;
            }
            else
            {
                SetContentView(Resource.Layout.DownloadActivityLandscape);

                _countryAdapter                     = new DownloadCountryAdapter(this, true);
                _downloadCountryListView            = FindViewById <ListView>(Resource.Id.DownloadCountryListView);
                _downloadCountryListView.Adapter    = _countryAdapter;
                _downloadCountryListView.ItemClick += OnCountryListItemClicked;
            }


            var page1 = TabHost.NewTabSpec("tab_test1");

            page1.SetIndicator(Resources.GetText(Resource.String.Common_POIs));
            page1.SetContent(Resource.Id.downloadTabPois);
            TabHost.AddTab(page1);


            var page2 = TabHost.NewTabSpec("tab_test2");

            page2.SetIndicator(Resources.GetText(Resource.String.Common_ElevationData));
            page2.SetContent(Resource.Id.downloadTabEleData);
            TabHost.AddTab(page2);

            TabHost.CurrentTab = 0;

            var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);

            SetActionBar(toolbar);

            ActionBar.SetDisplayShowHomeEnabled(true);
            ActionBar.SetDisplayHomeAsUpEnabled(true);
            ActionBar.SetTitle(Resource.String.DownloadActivity);

            _downloadItemListView = FindViewById <ListView>(Resource.Id.DownloadItemListView);

            _downloadItemAdapter          = new DownloadItemAdapter(this, this);
            _downloadItemListView.Adapter = _downloadItemAdapter;

            _downloadedElevationDataListView         = FindViewById <ListView>(Resource.Id.listViewDownloadedElevationData);
            _downloadedElevationDataAdapter          = new DownloadedElevationDataAdapter(this, this);
            _downloadedElevationDataListView.Adapter = _downloadedElevationDataAdapter;

            var _downloadedElevationDataAddButton = FindViewById <Button>(Resource.Id.buttonAddNew);

            _downloadedElevationDataAddButton.SetOnClickListener(this);
        }