Наследование: FragmentPagerAdapter
Пример #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

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

            // Instantiate the deck of flash cards:
            FlashCardDeck flashCards = new FlashCardDeck();

            // Instantiate the adapter and pass in the deck of flash cards:
            FlashCardDeckAdapter adapter = new FlashCardDeckAdapter(SupportFragmentManager, flashCards);

            // Find the ViewPager and plug in the adapter:
            ViewPager pager = (ViewPager)FindViewById(Resource.Id.pager);
            pager.Adapter = adapter;
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

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

            // Instantiate the deck of flash cards:
            FlashCardDeck flashCards = new FlashCardDeck();

            // Instantiate the adapter and pass in the deck of flash cards:
            FlashCardDeckAdapter adapter = new FlashCardDeckAdapter(SupportFragmentManager, flashCards);

            // Find the ViewPager and plug in the adapter:
            ViewPager pager = (ViewPager)FindViewById(Resource.Id.pager);

            pager.Adapter = adapter;
        }