public void SetUpViewPager(ViewPager viewPager)
        {
            TabAdapter adapter = new TabAdapter(SupportFragmentManager);

            adapter.AddFragment(new StopFragment(), "Stops");
            adapter.AddFragment(new MapsFragment(), "Map");

            Bundle stopArgs = new Bundle();
            Bundle mapArgs  = new Bundle();

            stopArgs.PutString("Trail ID", trailId);
            mapArgs.PutString("Trail ID", trailId);

            var stopFragment = adapter.GetItem(0);
            var mapFragment  = adapter.GetItem(1);

            stopFragment.Arguments = stopArgs;
            mapFragment.Arguments  = mapArgs;

            viewPager.Adapter = adapter;
        }
Exemple #2
0
        public void SetUpViewPager(ViewPager viewPager)
        {
            TabAdapter adapter = new TabAdapter(SupportFragmentManager);

            adapter.AddFragment(new DetailStopFragment(), "Details");

            Bundle args = new Bundle();

            args.PutString("Trail ID", trailId);
            args.PutString("Stop ID", stopId);
            var stopFragment = adapter.GetItem(0);

            stopFragment.Arguments = args;

            viewPager.Adapter = adapter;
        }