Beispiel #1
0
        /// <summary>
        /// Returns a new instance of this fragment for the given section number.
        /// </summary>
        /// <returns>The instance.</returns>
        /// <param name="sectionNumber">Section number.</param>
        public static PlaceholderFragment NewInstance(int sectionNumber)
        {
            PlaceholderFragment fragment = new PlaceholderFragment();
            Bundle args = new Bundle();

            args.PutInt(ARG_SECTION_NUMBER, sectionNumber);
            fragment.Arguments = args;
            return(fragment);
        }
Beispiel #2
0
 public override Android.Support.V4.App.Fragment GetItem(int position)
 {
     // getItem is called to instantiate the fragment for the given page.
     // Return a PlaceholderFragment (defined as a static inner class below).
     return(PlaceholderFragment.NewInstance(position + 1));
 }