/** Returns a new instance of this fragment for the given section number. */ public static InventoryFragment newInstance(int sectionNumber) { InventoryFragment fragment = new InventoryFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; }