@Override
 public void onNavigationDrawerItemSelected(int position) {
   // update the main content by replacing fragments
   FragmentManager fragmentManager = getFragmentManager();
   switch (position) {
     case 0:
       fragmentManager
           .beginTransaction()
           .replace(R.id.container, TrendingShowsFragment.newInstance(position + 1))
           .commit();
       break;
     case 1:
       // TODO Change the fragment
       fragmentManager
           .beginTransaction()
           .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))
           .commit();
       break;
     case 2:
       // TODO Change the fragment
       fragmentManager
           .beginTransaction()
           .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))
           .commit();
       break;
     default:
       fragmentManager
           .beginTransaction()
           .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))
           .commit();
       break;
   }
 }
 @Override
 public Fragment getItem(int position) {
   // getItem is called to instantiate the fragment for the given page.
   // Return a PlaceholderFragment (defined as a static inner class below).
   PlaceholderFragment instance = PlaceholderFragment.newInstance(position);
   return instance;
 }
  @Override
  public void onNavigationDrawerItemSelected(int position) {
    // update the main content by replacing fragments

    switch (position) {
      case 0:
        fragment = PlaceholderFragment.newInstance(position + 1);
        break;
      case 1:
        fragment = NoticiasFragment.newInstance(position + 1);
        break;
      case 2:
        fragment = CDFragment.newInstance(position + 1);
        break;
      case 3:
        fragment = ParquesFragment.newInstance(position + 1);
        break;
      case 4:
        Bundle bundle = new Bundle();
        bundle.putBoolean("logged", logged);
        fragment = ReporteProblema.newInstance(position + 1);
        fragment.setArguments(bundle);
        break;
      case 5:
        fragment = SolicitudesFragment.newInstance(position + 1);
        break;
    }
    FragmentManager fragmentManager = getSupportFragmentManager();
    fragmentManager.beginTransaction().replace(R.id.container, fragment).commit();
  }
 @Override
 public void onNavigationDrawerItemSelected(int position) {
   FragmentManager fragmentManager = getSupportFragmentManager();
   fragmentManager
       .beginTransaction()
       .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))
       .commit();
 }
 @Override
 public Fragment getItem(int position) {
   if (position == 0) return cardsetPickerFragment;
   else if (position == 1) return cardsetRecentsFragment;
   // getItem is called to instantiate the fragment for the given page.
   // Return a PlaceholderFragment (defined as a static inner class below).
   return PlaceholderFragment.newInstance(position + 1);
 }
示例#6
0
 @Override
 public boolean onNavigationItemSelected(int position, long id) {
   // When the given dropdown item is selected, show its contents in the
   // container view.
   getSupportFragmentManager()
       .beginTransaction()
       .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))
       .commit();
   return true;
 }
示例#7
0
 @Override
 public void onNavigationDrawerItemSelected(int position) {
   // update the main content by replacing fragments
   // FragmentManager fragmentManager = getFragmentManager();
   manager = getFragmentManager();
   manager
       .beginTransaction()
       .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))
       .commit();
 }
  /** Return instances of tabs as requested by the FragmentManager */
  @Override
  public Fragment getItem(int position) {
    // getItem is called to instantiate the fragment for the given page.
    // Return a PlaceholderFragment (defined as a static inner class
    // below).

    switch (position) {
      case 0:
        return _connectTabFragment;
      case 1:
        return _playTabFragment;
      default:
        return PlaceholderFragment.newInstance(position + 1);
    }
  }
    @Override
    public Fragment getItem(int position) {
      switch (position) {
        case 0:
          return MyPlaylistListFragment.newInstance(
              Constants.ARGUMENT_NEWS_ADDED, Constants.CATEGORY_NEWS);
        case 1:
          return MyPlaylistListFragment.newInstance(
              Constants.ARGUMENT_NEWS_ADDED, Constants.CATEGORY_ARTICLE);
        case 2:
          return MyPlaylistListFragment.newInstance(
              Constants.ARGUMENT_NEWS_ADDED, Constants.CATEGORY_STORY);
      }

      return PlaceholderFragment.newInstance(position);
    }
示例#10
0
    @Override
    public Fragment getItem(int position) {
      // getItem is called to instantiate the fragment for the given page.
      // Return a PlaceholderFragment (defined as a static inner class below).
      String group;

      if (position == 1) {
        group = "Jones family";
      } else if (position == 2) {
        group = "Shane's group";
      } else if (position == 3) {
        group = "unkown";
      }
      group = "unkown2";

      return PlaceholderFragment.newInstance(position, group);
    }
  @Override
  public void onNavigationDrawerItemSelected(int position) {
    Fragment objFragment = null;

    switch (position) {
      case 0:
        objFragment = new DrawerMenu1();
        break;
      case 1:
        break;
      case 2:
        break;
    }
    // update the main content by replacing fragments
    FragmentManager fragmentManager = getSupportFragmentManager();
    fragmentManager
        .beginTransaction()
        .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))
        .commit();
  }
示例#12
0
    @Override
    public Fragment getItem(int position) {
      // getItem is called to instantiate the fragment for the given page.
      // Return a PlaceholderFragment (defined as a static inner class below).
      // return PlaceholderFragment.newInstance(position + 1);

      // This method needs to be changed to return the 3 different fragment types
      // for each type - if position = 0, list, = 1, QR, = 2, other list.

      // To change the type/number of tabs, change this
      switch (position) {
        case 0:
          return ProductListFragment.newInstance(position + 1);
        case 1:
          return QRFragment.newInstance(position + 1);
        case 2:
          return EventFragment.newInstance(position + 1);
        default:
          return PlaceholderFragment.newInstance(position + 1);
      }
    }
示例#13
0
 @Override
 public Fragment getItem(int position) {
   return PlaceholderFragment.newInstance(position + 1);
 }
示例#14
0
 @Override
 public Fragment getItem(int position) {
   if (position == 1) {
     return new Chats();
   } else return PlaceholderFragment.newInstance(position + 1);
 }