Example #1
0
 public static NewsFragment newInstance(String plusId) {
   NewsFragment fragment = new NewsFragment();
   Bundle arguments = new Bundle();
   arguments.putString("plus_id", plusId);
   fragment.setArguments(arguments);
   return fragment;
 }
Example #2
0
 @Override
 public Fragment getItem(int position) {
   switch (position) {
     case 0:
       return NewsFragment.newInstance(mSelectedChapter.getGplusId());
     case 1:
       return InfoFragment.newInstance(mSelectedChapter.getGplusId());
     case 2:
       return EventFragment.newInstance(mSelectedChapter.getGplusId());
   }
   return null;
 }