Exemplo n.º 1
0
 public static CategoryFragment newInstance(int type, Shop shop) {
   CategoryFragment fragment = new CategoryFragment();
   Bundle bundle = new Bundle();
   bundle.putInt("type", type);
   bundle.putSerializable("shop", shop);
   fragment.setArguments(bundle);
   return fragment;
 }
Exemplo n.º 2
0
 @Override
 public Fragment getItem(int arg0) {
   if (arg0 == 0) {
     return CategoryFragment.newInstance(6, null);
   } else if (arg0 == 1) {
     return new RecommandFragment();
   }
   return null;
 }