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;
        }
Exemple #3
0
 // Constructor accepts a deck of flash cards:
 public FlashCardDeckAdapter(Android.Support.V4.App.FragmentManager fm, FlashCardDeck flashCards)
     : base(fm)
 {
     this.flashCardDeck = flashCards;
 }
 // Constructor accepts a deck of flash cards:
 public FlashCardDeckAdapter(Android.Support.V4.App.FragmentManager fm, FlashCardDeck flashCards) 
     : base(fm)
 {
     this.flashCardDeck = flashCards;
 }