protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            this.SetContentView(Resource.Layout.CollectionDemoActivity);

            // Create an adapter that when requested, will return a fragment representing an object in
            // the collection.
            //
            // ViewPager and its adapters use support library fragments, so we must use
            // getSupportFragmentManager.
            this.mDemoCollectionPagerAdapter = new DemoCollectionPagerAdapter(this.SupportFragmentManager);

            // Set up action bar.
            var actionBar = this.ActionBar;
            // Specify that the Home button should show an "Up" caret, indicating that touching the
            // button will take the user one step up in the application's hierarchy.
            actionBar.SetDisplayHomeAsUpEnabled(true);

            // Set up the ViewPager, attaching the adapter.
            this.mViewPager = this.FindViewById<ViewPager>(Resource.Id.Pager);
            this.mViewPager.Adapter = this.mDemoCollectionPagerAdapter;
        }
Example #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            this.SetContentView(Resource.Layout.CollectionDemoActivity);

            // Create an adapter that when requested, will return a fragment representing an object in
            // the collection.
            //
            // ViewPager and its adapters use support library fragments, so we must use
            // getSupportFragmentManager.
            this.mDemoCollectionPagerAdapter = new DemoCollectionPagerAdapter(this.SupportFragmentManager);

            // Set up action bar.
            var actionBar = this.ActionBar;

            // Specify that the Home button should show an "Up" caret, indicating that touching the
            // button will take the user one step up in the application's hierarchy.
            actionBar.SetDisplayHomeAsUpEnabled(true);

            // Set up the ViewPager, attaching the adapter.
            this.mViewPager         = this.FindViewById <ViewPager>(Resource.Id.Pager);
            this.mViewPager.Adapter = this.mDemoCollectionPagerAdapter;
        }