public static LogFragment newInstance(int categoryId) { LogFragment fragment = new LogFragment(); Bundle args = new Bundle(); args.putInt(ARG_CATEGORY_ID, categoryId); fragment.setArguments(args); return fragment; }