Esempio n. 1
0
        public static FragmentTest newInstance(int page)
        {
            FragmentTest fragmentTest = new FragmentTest();
            Bundle       args         = new Bundle();

            args.PutInt("page", page);
            fragmentTest.Arguments = args;
            return(fragmentTest);
        }
Esempio n. 2
0
        public void setupViewPager(ViewPager viewPager, AdapterCustomPager adapter)
        {
            mFragmentTest1 = FragmentTest.newInstance(1);
            mFragmentTest2 = FragmentTest.newInstance(2);

            adapter.addFragment(mFragmentTest1, "Фрагмент 1");
            adapter.addFragment(mFragmentTest2, "Фрагмент 2");

            viewPager.Adapter = adapter;
        }