FlashCardPager.FlashCardFragment.OnCreateView C# (CSharp) Method

OnCreateView() public method

public OnCreateView ( Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Bundle savedInstanceState ) : Android.Views.View
inflater Android.Views.LayoutInflater
container Android.Views.ViewGroup
savedInstanceState Bundle
return Android.Views.View
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Get the question (math problem) and answer for this flash card fragment:
            string question = Arguments.GetString(FLASH_CARD_QUESTION, "");
            string answer = Arguments.GetString(FLASH_CARD_ANSWER, "");

            // Inflate this fragment from the "flashcard_layout":
            View view = inflater.Inflate(Resource.Layout.flashcard_layout, container, false);

            // Locate the question box TextView within the fragment's container:
            TextView questionBox = (TextView)view.FindViewById(Resource.Id.flash_card_question);

            // Load the flash card with the math problem:
            questionBox.Text = question;

            // Create a handler to report the answer when the math problem is tapped:
            questionBox.Click += delegate
            {
                Toast.MakeText(Activity.ApplicationContext,
                        "Answer: " + answer, ToastLength.Short).Show();
            };
            return view;
        }
    }