示例#1
0
        // Lifecycle
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            ViewModel.LoadState();

            SetContentView(Resource.Layout.Main);

            homeViewPagerAdapter = new HomeViewPagerAdapter(SupportFragmentManager);
            viewPager            = FindViewById <ViewPager> (Resource.Id.viewPagerHome);
            viewPager.Adapter    = homeViewPagerAdapter;
            viewPager.SetOnPageChangeListener(this);

            // Action Bar with tabs
            ActionBar.NavigationMode = ActionBarNavigationMode.Tabs;
            ActionBar.AddTab(ActionBar.NewTab().SetText("Today").SetTabListener(this));
            ActionBar.AddTab(ActionBar.NewTab().SetText("Inbox").SetTabListener(this));
        }
示例#2
0
        // Lifecycle
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            ViewModel.LoadState ();

            SetContentView (Resource.Layout.Main);

            homeViewPagerAdapter = new HomeViewPagerAdapter (SupportFragmentManager);
            viewPager = FindViewById<ViewPager> (Resource.Id.viewPagerHome);
            viewPager.Adapter = homeViewPagerAdapter;
            viewPager.SetOnPageChangeListener (this);

            // Action Bar with tabs
            ActionBar.NavigationMode = ActionBarNavigationMode.Tabs;
            ActionBar.AddTab(ActionBar.NewTab ().SetText ("Today").SetTabListener (this));
            ActionBar.AddTab(ActionBar.NewTab ().SetText ("Inbox").SetTabListener (this));
        }