Esempio n. 1
0
  private void setupViewPager(ViewPager viewPager) {

    PagerAdapter adapter = new PagerAdapter(getSupportFragmentManager());
    adapter.addFragment(new RouteWalkFragment(), "");
    adapter.addFragment(new RouteWalkFragment(), "");
    adapter.addFragment(new RouteWalkFragment(), "");
    adapter.addFragment(new RouteBusFragment(), "");
    viewPager.setAdapter(adapter);
    viewPager.setCurrentItem(0);
  }