Example #1
0
 void setupViewPager()
 {
     adapter = new customViewPagerAdapter(ChildFragmentManager);
     adapter.AddFragment(SmallFragment.newInstance("1"), "first");
     adapter.AddFragment(SmallFragment.newInstance("2"), "second");
     adapter.AddFragment(SmallFragment.newInstance("3"), "third");
     adapter.AddFragment(SmallFragment.newInstance("4"), "fouth");
     viewPager.Adapter = adapter;
 }
Example #2
0
        public static SmallFragment newInstance(string str)
        {
            SmallFragment fr   = new SmallFragment();
            Bundle        args = new Bundle();

            args.PutString("name", str);
            fr.Arguments = args;
            return(fr);
        }
Example #3
0
        void btn_Click(object sender, EventArgs e)
        {
            adapter.AddFragment(SmallFragment.newInstance("5"), "fifth");

            adapter.NotifyDataSetChanged();
        }