private void SetUpViews() { pager = (ViewPager)FindViewById <ViewPager> (Resource.Id.pager); first_indicator = (ImageView)FindViewById(Resource.Id.indicator_0); second_indicator = (ImageView)FindViewById(Resource.Id.indicator_1); PagerAdapter adapter = new PagerAdapter(SupportFragmentManager); counter_page = new CounterFragment(); setting_page = new SettingsFragment(this); adapter.AddFragment(counter_page); adapter.AddFragment(setting_page); SetIndicator(0); pager.SetOnPageChangeListener(new MyOnPageChangeListener(this)); pager.Adapter = adapter; }
private void SetUpViews() { pager = (ViewPager)FindViewById<ViewPager> (Resource.Id.pager); first_indicator = (ImageView)FindViewById (Resource.Id.indicator_0); second_indicator = (ImageView)FindViewById (Resource.Id.indicator_1); PagerAdapter adapter = new PagerAdapter (FragmentManager); counter_page = new CounterFragment (); setting_page = new SettingsFragment (this); adapter.AddFragment (counter_page); adapter.AddFragment (setting_page); SetIndicator (0); pager.SetOnPageChangeListener (new MyOnPageChangeListener (this)); pager.Adapter = adapter; }