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; }
@Override public Fragment getItem(int arg0) { if (arg0 == 0) { return CategoryFragment.newInstance(6, null); } else if (arg0 == 1) { return new RecommandFragment(); } return null; }