Ejemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);
            ViewPager   viewPager   = FindViewById <ViewPager>(Resource.Id.viewpager);
            TreeCatalog treeCatalog = new TreeCatalog();

            viewPager.Adapter = new TreePagerAdapter(this, treeCatalog);
            viewPager.SetCurrentItem(1, false);
            var dots = FindViewById <TabLayout>(Resource.Id.dots);

            dots.SetupWithViewPager(viewPager, true); // <- magic here
        }
Ejemplo n.º 2
0
 public TreePagerAdapter(Context context, TreeCatalog treeCatalog)
 {
     this.context     = context;
     this.treeCatalog = treeCatalog;
 }